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.