Narrated Abu Salama: I used to see a dream which would make me sick till I heard Abu Qatadah saying, “I, too, used to see a dream which would make me sick till I heard the Prophet (sal Allahu alaihi wa sallam) saying, ‘A good dream is from Allah, so if anyone of you saw a dream which he liked, he should not tell it to anybody except to the one whom he loves, and if he saw a dream which he disliked, then he should seek refuge with Allah from its evil and from the evil of Shaitan, and spit three times (on his left) and should not tell it to anybody, for it will not harm him.’” [#7044: The Book of the Interpretation of Dreams: Sahih Bukhari]
Commentary: This hadith provides guidelines regarding what to do with dreams. The first comforting thing we are told is that bad dreams are nothing to fear. Rather than get upset and worried after having a nightmare, we are told not to fret over it as bad dreams are from Shaitan and have no power to harm us should we follow the advice of the Prophet (sal Allahu alaihi wa sallam). What we should do when we awaken from a bad dream is seek Allah’s refuge from the evil in the dream and from the evil of Shaitan and then spit (lightly) three times to the left. Once we have done that and placed our trust in Allah (subhana wa ta’ala) then we can forget about the dream for it will have no power to harm us. It is crucial though that one not tell a bad dream to anybody either.
As far as good dreams are concerned, we should also exercise caution with them. If we must tell the dream to anybody, then to safeguard a good outcome from a good dream, we should only tell it to those whom we love and trust and are sure harbor no ill feelings or jealousy towards us.