I used to see (such horrible dreams) that I fell ill. I saw Abu Qatada who also said: I used to see dreams which made me sick until I heard Messenger of Allah ﷺ as saying: Good dreams are from Allah, so if any one of you sees which he likes he should not disclose it to one but whom he loves, but if he sees something which he does not like he should spit on his left side thrice and seek refuge with Allah from the mischief of the Satan and its mischief (i.e. of the dream), and he should not relate it to anyone, then it would not harm him. (Using translation from Muslim 2261g)
وَأَنَا فَكُنْتُ لَأَرَى الرُّؤْيَا تُمْرِضُنِي حَتَّى سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ الرُّؤْيَا الصَّالِحَةُ مِنَ اللهِ وَإِذَا رَأَى أَحَدُكُمْ مَا يُحِبُّ فَلَا يُحَدِّثْ بِهَا إِلَّا مَنْ يُحِبُّ وَإِذَا رَأَى مَا يَكْرَهُ فَلْيَتْفُلْ عَنْ يَسَارِهِ ثَلَاثًا وَلْيَتَعَوَّذْ بِاللهِ مِنَ الشَّيْطَانِ وَشَرِّهَا وَلَا يُحَدِّثْ بِهَا أَحَدًا فَإِنَّهَا لَا تَضُرُّهُ قَالَ حَجَّاجٌ قَالَ شُعْبَةُ فَقُلْتُ لَهُ لِيَتَعَوَّذْ بِاللهِ مِنَ الشَّيْطَانِ؟ قَالَ نَعَمْ