Huzaifa bin Yaman reported,

Whenever he, meaning the Prophet ﷺ, retired to his bed, he would place his right hand under his cheek and say, "My Lord, protect me from Your punishment on the Day You resurrect," or "gather Your servants."

Azami 11243

Sahih

عن حذيفة قال

كان-يعني النبي ﷺ- إذا أوى إلى فراشه وضع يده اليمنى تحت خده وقال: رب قني عذابك يوم تبعث- أو تجمع- عبادك.

الأعظمي 11243صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Morning and evening supplications
Section
Supplications and remembrances narrated when going to sleep and when waking up
Numbering
Jami al-Kamil 11243 (2nd edition)
Azami 11243