The Book of the Etiquette of Sleeping, Lying and Sitting etc
Riyad as-Salihin #163
كتاب آداب النوم
وعن جابر رضى الله عنه عن رسول الله صلى الله عليه وسلم قال: «إذا رأى أحدكم الرؤيا يكرهها، فليبصق عن يساره ثلاثاً، وليستعذ بالله من الشيطان ثلاثاً، وليتحول عن جنبه الذي كان عليه» ((رَوَاهُ مُسلِمٌ)).
Jabir (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, “When one of you sees a bad dream let him blow three times on his left, seek refuge in Allah from the Satan three times (i.e., by saying: A'udhu billahi minash-Shaitanir-Rajim) and change the side on which he was lying.”.
وعن جابر رضى الله عنه عن رسول الله صلى الله عليه وسلم قال: "إذا رأى أحدكم الرؤيا يكرهها، فليبصق عن يساره ثلاثاً، وليستعذ بالله من الشيطان ثلاثاً، وليتحول عن جنبه الذي كان عليه" ((رَوَاهُ مُسلِمٌ)).
Messenger of Allah (ﷺ) said, "When one of you sees a bad dream let him blow three times on his left, seek refuge in Allah from the Satan three times (i.e., by saying: A'udhu billahi minash-Shaitanir-Rajim) and change the side on which he was lying.".
— Riyad as-Salihin, Hadith 163