Hadithcore
Sahih Muslim, 2710 d
sahih

This hadith has been transmitted on the authority of al-Bara' b. 'Azib that Allah's Messenger (ﷺ) said to a person:

O, so and so, as you go to your bed; the rest of the hadith is the same but with this variation of wording that he said:" Your Messenger whom You sent." If you die that night you would die on Fitra and if you get up in the morning you would get up with a bliss.

حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا أَبُو الأَحْوَصِ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ بْنِ، عَازِبٍ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لِرَجُلٍ ‏"‏ يَا فُلاَنُ إِذَا أَوَيْتَ إِلَى فِرَاشِكَ ‏"‏ ‏.‏ بِمِثْلِ حَدِيثِ عَمْرِو بْنِ مُرَّةَ غَيْرَ أَنَّهُ قَالَ ‏"‏ وَبِنَبِيِّكَ الَّذِي أَرْسَلْتَ ‏.‏ فَإِنْ مُتَّ مِنْ لَيْلَتِكَ مُتَّ عَلَى الْفِطْرَةِ وَإِنْ أَصْبَحْتَ أَصَبْتَ خَيْرًا ‏"‏ ‏.‏

References2 variants
In-Book Reference
Book 48, Hadith 78
USC-MSA web (English) reference
Book 35, Hadith 6547 (deprecated numbering scheme)