When the Prophet ﷺ would lie down to sleep, he would place his hand against his cheek and say, "Allah, protect me from Your punishment on the day You resurrect Your servants."
حدثنا أبو داود الحفري عن سفيان عن أبي إسحاق
كان النبي ﷺ إذا نام وضع يده على خده ثم قال اللهم قني عذابك يوم تبعث عبادك
Its isnad is sahih, and it is found in Abu Dawud 4/311, no. 5045, in the Book of Manners, chapter on what one says when going to sleep. And Tirmidhi 5/468, no. 3394, who graded it hasan.