Narrated Abu Qatada:
The Prophet ﷺ said, "A good dream is from Allah, and a bad or evil dream is from Satan;
so if anyone of you has a bad dream of which he gets afraid, he should spit on his left side and should seek Refuge with Allah from its evil, for then it will not harm him."
Sahih al-Bukhari, Vol. 4, Book of Beginning of Creation, Hadith 513
Sahih al-Bukhari, Book of Beginning of Creation, Hadith 513