A man came to the Prophet ﷺ while he was delivering a sermon and said, "Messenger of Allah, last night I saw in a dream as though my neck had been struck and my head fell off, so I chased after it, picked it up, and put it back in place."The Messenger of Allah ﷺ replied, "When Satan toys with one of you in his sleep, he should not tell people about it."
حدثنا علي بن محمد حدثنا أبو معاوية عن الأعمش عن أبي سفيان
أتى النبي ﷺ رجل وهو يخطب فقال يا رسول الله رأيت البارحة فيما يرى النائم كأن عنقي ضربت وسقط رأسي فاتبعته فأخذته فأعدته فقال رسول الله ﷺ إذا لعب الشيطان بأحدكم في منامه فلا يحدثن به الناس
Muslim narrated it in "Dreams," chapter "One should not speak of what Satan toys with him in a dream," no. 15/2268, from the hadith of Amash, similarly.