Jami` at-Tirmidhi, Volume 6, Book 45, Hadith 3417 (DarusSalam) ⓘ
Hudhaifah bin Al-Yaman [may Allah be pleased with him] narrated that when the Prophet wanted to sleep, he would say: “O Allah, in Your Name I die and I live (Allāhumma bismika amūtu wa aḥyā).” And when he would wake, he would say: “Allah praise is due to Allah who revived my soul after causing its death and to Him is the resurrection (Al-ḥamdulillāh, alladhī aḥyā nafsī ba`da mā amātahā wa ilaihin-nushūr).”
حَدَّثَنَا عُمَرُ بْنُ إِسْمَاعِيلَ بْنِ مُجَالِدِ بْنِ سَعِيدٍ، حَدَّثَنَا أَبِي، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ رِبْعِيٍّ، عَنْ حُذَيْفَةَ بْنِ الْيَمَانِ، رضى الله عنهما أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا أَرَادَ أَنْ يَنَامَ قَالَ " اللَّهُمَّ بِاسْمِكَ أَمُوتُ وَأَحْيَا " . وَإِذَا اسْتَيْقَظَ قَالَ " الْحَمْدُ لِلَّهِ الَّذِي أَحْيَا نَفْسِي بَعْدَ مَا أَمَاتَهَا وَإِلَيْهِ النُّشُورُ " . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
also referenced under: Hadith 3417 (Reference) & Book 48, Hadith 48 (In-Book)