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).”
كَانَ رَسُولُ اللَّهِ ﷺ يَتَوَسَّدُ يَمِينَهُ عِنْدَ الْمَنَامِ ثُمَّ يَقُولُ رَبِّ قِنِي عَذَابَكَ يَوْمَ تَبْعَثُ عِبَادَكَ