Based on revelations 1400 years ago, Prophet Muhammad (peace be upon him) identified the three primary sources for dreams: 1. Divine 2. Satanic and 3. Human. Aboo Hurayrah narrated that Allaah’s Messenger (pbuh) said, “There are three types of dreams : a righteous dream which is glad tidings from Allaah; the dream which causes sadness is from satan; and a dream from the ramblings of the mind.”
The Prophet (pbuh) referred to pleasant dreams as coming from Allaah. Aboo Sa‘eed Al-Khudree quoted the Prophet (pbuh) as saying, “If anyone of you has a dream that he likes, then it is from Allaah. He should thank Allaah for it and narrate it to others.” Evil dreams are not from Allaah. They are by the permission of Allaah in the same way that evil in the waking world is by Allaah’s permission, but not from Him.
Also, good dreams are glad tidings from Allah. It is important to be careful whom one shares his good dream with. Remember when Prophet Yusuf’s father admonished him in Surah 12:5- He (the father) said, “O my son! Relate not your vision to your brothers lest they arrange a plot against you. Verily! Satan is to man an open enemy.”
Bad dreams are from the interference of evil jinns in our dream state. In the same way that evil jinns are able to introduce evil thoughts in the human mind in its waking state, they are able to do so in its sleeping state, by the permission of Allah. Satanic dream causes sadness and fear. Allah says in the holy Quran: “Secret meetings are only from Satan, to cause grief to the believers. However, he cannot harm them in any way, except as Allaah permits. So let the believers put their trust in Allaah.” al-Mujaadalah (58):10
Jaabir related from Allaah’s Messenger (pbuh) that he said, “If any of you sees in a dream something he dislikes, he should spit thrice to his left, seek refuge with Allaah from Satan thrice, and change the side on which he was lying.”
You may also make this dua following a nightmare: ‘Amr ibn Shu‘ayb quoted his grandfather as saying that Allaah’s Messenger (pbuh) used to teach them the following words for protection against panic [due to nightmares]: “A‘ooth bi kalimaatil-laahit-taam-mati min ghadabihi wa sharri ‘ibaadihi wa min hamazaatish-shayaateeni wa an yahduroon [I seek refuge in the perfect words of Allaah from His anger, the evil of His servants, and from the evil suggestions of the devils and their presence].
It is important to remember that evil dreams should not be disclosed to anyone. Aboo Sa‘eed al-Khudree narrated that Allaah’s Messenger (pbuh) said, “If anyone of you has a dream that he likes, then it is from Allaah. He should thank Allaah for it and narrate it to others. If he has a dream that he dislikes, then it is from Satan. He should seek refuge with Allaah from its evil, and he should not mention it to anybody, then it will not harm him.”
To conclude, let’s remember that it is forbidden to forge dreams. Ibn ‘Umar quoted Allaah’s Messenger (pbuh) as saying, “Indeed, the worst lie is that of a person who falsely claims to have a dream.”
May Allah grant us good dreams and protect us from shaitan.