عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ رَضِيَ اللَّهُ عَنْهُمَا عَنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ أَنَّهُ قَالَ إِذَا رَأَى أَحَدُكُمُ الرُّؤْيَا يَكْرَهُهَا فَلْيَبْصُقْ عَنْ يَسَارِهِ ثَلَاثًا وَلْيَسْتَعِذْ بِاللَّهِ مِنَ الشَّيْطَانِ ثَلَاثًا وَلْيَتَحَوَّلْ عَنْ جَنْبِهِ الَّذِي كَانَ عَلَيْهِ
Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates that the Noble Prophet (peace and blessings be upon him) said: When any of you sees a dream which he dislikes, he should spit three times to his left and seek Allah’s protection from Satan three times (i.e., recite: A‘udhu billahi min ash-shaytan ir-rajim), and he should change the side on which he was lying.