Jami` at-Tirmidhi, Book 48, Hadith 29 (In-Book) ⓘ
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).”
حَدَّثَنَا ابْنُ أَبِي عُمَرَ، حَدَّثَنَا سُفْيَانُ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ رِبْعِيِّ بْنِ حِرَاشٍ، عَنْ حُذَيْفَةَ بْنِ الْيَمَانِ، رضى الله عنهما أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ إِذَا أَرَادَ أَنْ يَنَامَ وَضَعَ يَدَهُ تَحْتَ رَأْسِهِ ثُمَّ قَالَ " اللَّهُمَّ قِنِي عَذَابَكَ يَوْمَ تَجْمَعُ عِبَادَكَ أَوْ تَبْعَثُ عِبَادَكَ " . قَالَ هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
also referenced under: Hadith 3398 (Reference) & Volume 6, Book 45, Hadith 3398 (DarusSalam)