Abdullah bin Umar reported,

He instructed a man that when he lay down to sleep he should say, "O Allah, You created my soul and You take it in death. To You belong its death and its life. If You keep it alive, then protect it, and if You cause it to die, then forgive it. O Allah, I ask You for well-being."A man said to him, "Did you hear this from Umar?"He replied, "From one better than Umar رضي الله عنه, from the Messenger of Allah ﷺ."

Ahmad 5502

Sahih

حدثنا محمد بن جعفر حدثنا شعبة عن خالد حدثنا عبد الله بن الحارث

عن عبد الله بن عمر

أنه أمر رجلا إذا أخذ مضجعه قال اللهم إنك خلقت نفسي وأنت توفاها لك مماتها ومحياها إن أحييتها فاحفظها وإن أمتها فاغفر لها اللهم أسألك العافية فقال له رجل سمعت هذا من عمر فقال من خير من عمر رضي الله عنه من رسول الله ﷺ

أحمد 5502صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Umar
Numbering
Darussalam 5502
Ahmad 5502