عَنِ الْبَرَاءِ رَضِيَ اللَّهُ عَنْهُ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ كَانَ إِذَا اسْتَيْقَظَ قَالَ الْحَمْدُ لِلَّهِ الَّذِي أَحْيَانَا بَعْدَمَا أَمَاتَنَا وَإِلَيْهِ النُّشُورُ قَالَ شُعْبَةُ هَذَا أَوْ نَحْوَ هَذَا الْمَعْنَى وَإِذَا نَامَ قَالَ اللَّهُمَّ بِاسْمِكَ أَحْيَا وَبِاسْمِكَ أَمُوتُ
It is narrated from Sayyiduna Bara’ that when the Noble Prophet (peace and blessings be upon him) would wake up, he would recite this supplication: "All praise is due to Allah, Who gave us life after He caused us to die, and to Him is the return." And when he would go to sleep, he would recite this supplication: "O Allah! In Your name I live and in Your name I die."