عن أبي سعيد الخُدْرِيِّ رضي الله عنه : أنه سمع النبي صلى الله عليه وسلم يقول: «إذا رأى أحدُكُم رُؤيا يُحِبُّهَا، فإنما هي من الله تعالى، فليَحْمَد الله عليها، وَلْيُحَدِّثْ بها - وفي رواية: فلا يُحَدِّثْ بها إلا من يُحَبُّ- وإذا رأى غير ذلك مِمَّا يَكْرَه، فإنما هي من الشيطان، فَلْيَسْتَعِذْ من شَرِّهَا، ولا يَذْكُرْهَا لأحد؛ فإنها لا تضره».
[صحيح] - [متفق عليه]
Abu Sa‘īd al-Khudri (may Allah be pleased with him) reported that he heard the Prophet (may Allah's peace and blessings be upon him) say: "If anyone of you sees a vision that he likes, then it is from Allah, the Exalted. He should praise Allah for it and relate it to others." Another narration reads: "He should narrate it only to those whom he loves. If he sees something else which he dislikes, then it is from the devil. He should seek refuge with Allah from its evil and not narrate it to anyone, for this way it will not harm him."
Sahih/Authentic. - [Al-Bukhari and Muslim]
If a Muslim sees a dream that makes him happy, it is glad tidings from Allah, the Exalted. So he should praise Allah, the Almighty, for such glad tidings and narrate it only to those whom he loves from among his family, neighbors, and righteous friends. If he sees a bad dream that he dislikes its content or its interpretation, then it is simply satanic imaginations inspired by the devil to the sleeping person in order to frighten and sadden him. So if he sees something like that, he should seek refuge in Allah from its evil.