Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:2268dʿUthmān b. Abū Shaybah > Jarīr > al-Aʿmash > Abū Sufyān > Jābir

Messenger of Allah, I saw in the state of sleep as if my head had been cut off and I had been moving on haltingly after it. Thereupon Messenger of Allah ﷺ said to that desert Arab: Do not narrate to the people the vain sporting of satan with you in your sleep and (the narrator) also said: I heard Messenger of Allah ﷺ in his subsequent address: None amongst you should narrate the vain sporting of devil with him in the dream.  

مسلم:٢٢٦٨dوَحَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ حَدَّثَنَا جَرِيرٌ عَنِ الأَعْمَشِ عَنْ أَبِي سُفْيَانَ عَنْ جَابِرٍ قَالَ

جَاءَ أَعْرَابِيٌّ إِلَى النَّبِيِّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ رَأَيْتُ فِي الْمَنَامِ كَأَنَّ رَأْسِي ضُرِبَ فَتَدَحْرَجَ فَاشْتَدَدْتُ عَلَى أَثَرِهِ فَقَالَ رَسُولُ اللَّهِ ﷺ لِلأَعْرَابِيِّ لاَ تُحَدِّثِ النَّاسَ بِتَلَعُّبِ الشَّيْطَانِ بِكَ فِي مَنَامِكَ وَقَالَ سَمِعْتُ النَّبِيَّ ﷺ بَعْدُ يَخْطُبُ فَقَالَ لاَ يُحَدِّثَنَّ أَحَدُكُمْ بِتَلَعُّبِ الشَّيْطَانِ بِهِ فِي مَنَامِهِ