´Hudhaifah bin Al-Yaman (ra) narrated that:` When the Prophet (ﷺ) would sleep, he would put his hand under his head then say: “O Allah, safeguard me from Your Punishment the Day You gather [Your slaves] (Allāhumma qinī `adhābaka yawma tajma`u [`ibādak])” or “you resurrect your slaves (tab`athu `ibādak).”
Hadith Referenceسنن ترمذي / كتاب الدعوات عن رسول الله صلى الله عليه وسلم / 3398
´Al-Bara' bin `Azib (ra) narrated that:` The Messenger of Allah (ﷺ) used to lay his head upon his right hand when going to sleep, then say: “My Lord, safeguard me from Your punishment the Day You resurrect Your slaves (Rabbi qinī `adhābaka yawma tab`athu `ibādak).”
Hadith Referenceسنن ترمذي / كتاب الدعوات عن رسول الله صلى الله عليه وسلم / 3399