Hadith 2712

This hadith is listed as number 6888 in Maktaba Shamila

حَدَّثَنَا عُقْبَةُ بْنُ مُكْرَمٍ الْعَمِّيُّ ، وَأَبُو بَكْرِ بْنُ نَافِعٍ ، قَالَا : حَدَّثَنَا غُنْدَرٌ ، حَدَّثَنَا شُعْبَةُ ، عَنْ خَالِدٍ ، قَالَ : سَمِعْتُ عَبْدَ اللَّهِ بْنَ الْحَارِثِ يُحَدِّثُ ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ ، أَنَّهُ أَمَرَ رَجُلًا إِذَا أَخَذَ مَضْجَعَهُ قَالَ : " اللَّهُمَّ خَلَقْتَ نَفْسِي وَأَنْتَ تَوَفَّاهَا لَكَ مَمَاتُهَا وَمَحْيَاهَا ، إِنْ أَحْيَيْتَهَا فَاحْفَظْهَا وَإِنْ أَمَتَّهَا فَاغْفِرْ لَهَا ، اللَّهُمَّ إِنِّي أَسْأَلُكَ الْعَافِيَةَ " ، فَقَالَ لَهُ رَجُلٌ : أَسَمِعْتَ هَذَا مِنْ عُمَرَ ؟ ، فَقَالَ : مِنْ خَيْرٍ مِنْ عُمَرَ ، مِنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ ابْنُ نَافِعٍ فِي رِوَايَتِهِ : عَنْ عَبْدِ اللَّهِ بْنِ الْحَارِثِ ، وَلَمْ يَذْكُرْ سَمِعْتُ .
'Abdullah bin 'Umar commanded a person that as he went to bed, he should say: "O Allah, Thou created my being and it is for Thee to take it to its ultimate goal. And its death and life is due to Thee, and if Thou givest it life, safeguard it; and if Thou bringst death, grant it pardon. O Allah, I beg of Thee safety." A person said to him: Did you hear it from Umar? Thereupon he said: (I have heard from one) who is better than Umar, viz. from Allah's Messenger (ﷺ) . Ibn Nafi, reported this on the authority of 'Abdullah bin Harith but he did not make mention of this "that he heard it himself".
Hadith Reference صحيح مسلم / كتاب الذكر والدعاء والتوبة والاستغفار / 2712
Hadith Grading محدثین: أحاديث صحيح مسلم كلها صحيحة
Hadith Takhrij «أحاديث صحيح مسلم كلها صحيحة»
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary:

Benefits and Issues:
This supplication is also filled with the sentiments of servitude, and in the presence of Allah, it is an expression of servitude, humility, and helplessness. Above all, it calls upon His mercy the most.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 6888