كتاب آداب النوم
4  
The Book of the Etiquette of Sleeping, Lying and Sitting etc
(127)
Chapter: What is to be said at the time of Sleeping
(127)
باب ما يقوله عند النوم
Riyad as-Salihin 817
Ya'ish bin Tikhfah Al-Ghifari (May Allah be pleased with him) reported:
My father said: I was lying down on my belly in the mosque when someone shook me with his foot and said, "Lying down this way is disapproved by Allah." I looked up and saw that it was Messenger of Allah (ﷺ).

[Abu Dawud].

وعن يعيش بن طخفة الغفارى رضى الله عنه قال‏:‏ قال أبى‏:‏ بينما أنا مضطجع في المسجد على بطني إذا رجل يحركني برجله فقال‏:‏ ‏ "‏إن هذه ضجعة يبغضها الله‏"‏ قال‏:‏ فنظرت ، فإذا رسول الله صلى الله عليه وسلم‏. ((رواه أبو داود بإسناد صحيح))‏.‏
Reference : Riyad as-Salihin 817
In-book reference : Book 4, Hadith 5