It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that when the Prophet (peace and blessings of Allah be upon him) would lie down on his bed to sleep, he would place his right hand under his cheek and would supplicate: «اَللّٰهُمَّقِنِيعَذَابَكَيَوْمَتَجْمَعُعِبَادَكَ» "O Lord! Save me from the punishment of the Day when You will gather Your servants."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 3796
Hadith Gradingحکم دارالسلام:صحيح لغيره، وهذا إسناد ضعيف لانقطاعه، أبو عبيدة لم يسمع من أبيه عبدالله وهو أبوه.