Sunan Ibn Majah Book 35, Hadith 15
“Dreams are
of three types: Some are terrifying things from Satan, aimed at
causing grief to the son of Adam; some are things that a person is
concerned with when he is awake, so he sees them in his dreams; and
some are a part of the forty-six parts of prophecy.” He said: “I
said
to him: ‘Did you hear this from the Messenger of Allah (ﷺ)?’
He
said: ‘Yes, I heard it from the Messenger of Allah (ﷺ), I
heard it
from the Messenger of Allah (ﷺ).’”
“Dreams are of three types: Glad tidings from Allah, what is on a person’s mind, and frightening dreams from Satan. If any of you sees a dream that he likes, let him tell others of it if he wishes, but if he sees something that he dislikes, he should not tell anyone about it, and he should get up and perform prayer.”
“If anyone of you sees a dream that he dislikes, let him spit dryly to his left three times and seek refuge with Allah from Satan three times, and turn over onto his other side.”