Full Sharh — Riyad as-Salihin 785
وعن حذيفة رضي الله عنه أن رسول الله صلى الله عليه وسلم، كان إذا أراد أن يرقد وضع يده اليمنى تحت خده، ثم يقول: "اللهم قني عذابك يوم تبعث عبادك". ((رواه الترمذي وقال حديث حسن ورواه أبو داود من رواية حفصة رضي الله عنه وفيه أنه كان يقوله ثلاث مرات)).
English Translation
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).".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.
Source
Riyad as-Salihin(رياض الصالحين)
The Book of the Remembrance of Allah
Hadith Number
785