Narrated Hafsah, Ummul Mu'minin: When the Messenger of Allah (ﷺ) wanted to go to sleep, he put his right hand under his cheek and would then say three times: O Allah, guard me from Thy punishment on the day when Thou raisest up Thy servants
Hadith No. 5045
Sunan Abu Dawud
Gradings:
Al-Albani:
Sahih
Muhammad Muhyi Al-Din Abdul Hamid:
Sahih
Shuaib Al Arnaut:
Sahih Lighairihi
Zubair Ali Zai:
Isnaad Hasan