The Prophet ﷺ, when he retired to his bed, would place his right hand under his cheek and say, "O Allah, protect me from Your punishment on the Day You raise up," or "gather Your servants."
حدثنا علي بن محمد حدثنا وكيع عن إسرائيل عن أبي إسحق عن أبي عبيدة
أن النبي ﷺ كان إذا أوى إلى فراشه وضع يده يعني اليمنى تحت خده ثم قال اللهم قني عذابك يوم تبعث أو تجمع عبادك
[Sahih] Ahmad narrated it, 1/414, 443, from Waki with this chain, and it is found in Shamail by Tirmidhi, no. 255, and in Amal al-Yawm wal-Layla by Nasai, no. 756, from the hadith of Israil with this chain. It has corroborating narrations with Tirmidhi, no. 3398, and elsewhere. Tirmidhi said, "Hasan sahih." Refer to Musnad Humaydi, no. 444, in my edition, may Allah make its publication easy for us.