Huzaifa bin Yaman reported,

Whenever the Messenger of Allah ﷺ intended to sleep, he would say, "Allah, in Your name I die and I live." And when he woke, he would say, "Praise be to Allah who has restored my soul to me after causing it to die, and to Him is the resurrection."

Tirmidhi 3417

Sahih

حدثنا عمر بن إسمعيل بن مجالد بن سعيد الهمداني حدثنا أبي عن عبد الملك بن عمير عن ربعي

عن حذيفة بن اليمان رضي الله عنهما

أن رسول الله ﷺ كان إذا أراد أن ينام قال اللهم باسمك أموت وأحيا وإذا استيقظ قال الحمد لله الذي أحيا نفسي بعد ما أماتها وإليه النشور

الترمذي 3417صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Supplications
Chapter
From it, in the supplication "Praise be to Allah who gave life to my soul"
Numbering
Darussalam 3417
Tirmidhi 3417