The Prophet (ﷺ) would place his right hand under his cheek when about to sleep and supplicate:
اَللَّهُمَّ قِنِي عَذَابَكَ يَوْمَ تَبْعَثُ عِبَادَكَ
Pronunciation
Allaahumma qinee 'adhaabaka yawma tab'athu 'ibaadak
Meaning
O Allah, protect me from Your punishment on the day Your servants are resurrected.
Source: Sahih (Albani). At-Tirmizi: 3398
Read the hadith
حَدَّثَنَا ابْنُ أَبِي عُمَرَ، حَدَّثَنَا سُفْيَانُ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ رِبْعِيِّ بْنِ حِرَاشٍ، عَنْ حُذَيْفَةَ بْنِ الْيَمَانِ، رضى الله عنهما أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ إِذَا أَرَادَ أَنْ يَنَامَ وَضَعَ يَدَهُ تَحْتَ رَأْسِهِ ثُمَّ قَالَ " اللَّهُمَّ قِنِي عَذَابَكَ يَوْمَ تَجْمَعُ عِبَادَكَ أَوْ تَبْعَثُ عِبَادَكَ " . قَالَ هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
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).” Jami` at-Tirmidhi 3398 [Sahih (Albani). At-Tirmizi: 3398]
Duas from IslamicAPI's Masnun Dua dataset (based on the Quran, hadith, Hisnul Muslim and Rahe Belayat). See the dataset