It is narrated from Hazrat Bara (may Allah be pleased with him) that when the Noble Prophet (peace and blessings be upon him) intended to sleep, he would make his right hand a pillow and recite this supplication: O Allah! On the day You gather Your servants, protect me from Your punishment.
Hadith Referenceمسند احمد / أول مسند الكوفيين / 18472
Hadith Gradingحکم دارالسلام:حديث صحيح، وهذا إسناد اختلف فيه على أبى إسحاق