Hudhaifah (May Allah be pleased with him) reported:
Whenever the Messenger of Allah (ﷺ) intended to go to sleep, he would place his right hand under his (right) cheek and supplicate: "Allahumma qini 'adhabaka yauma tab'athu 'ibadaka (O Allah! Guard me against Your punishment on the Day when You will resurrect Your slaves)."[At-Tirmidhi].In a narration in Abu Dawud, Hafsah (May Allah be pleased with her) said: Before going to sleep the Messenger of Allah (ﷺ) would recite this Du'a three times.
App reference: Book 16, Hadith 57
Arabic/English book reference: Book 16, Hadith 1464