Sunan an-Nasa'i 404
It was narrated that 'Abdullah bin Abi Qais said:
"I asked 'Aishah: 'How did the Messenger of Allah (ﷺ) sleep while he was Junub? Did he perform Ghusl before sleeping or sleep before performing Ghusl?' She said: 'He did both. Sometimes he would perform Ghusl then sleep, and sometimes he would perform Wudu' then sleep.'"
أَخْبَرَنَا شُعَيْبُ بْنُ يُوسُفَ، قَالَ حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، عَنْ مُعَاوِيَةَ بْنِ صَالِحٍ، عَنْ عَبْدِ اللَّهِ بْنِ أَبِي قَيْسٍ، قَالَ سَأَلْتُ عَائِشَةَ كَيْفَ كَانَ نَوْمُ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي الْجَنَابَةِ أَيَغْتَسِلُ قَبْلَ أَنْ يَنَامَ أَوْ يَنَامُ قَبْلَ أَنْ يَغْتَسِلَ قَالَتْ كُلُّ ذَلِكَ قَدْ كَانَ يَفْعَلُ رُبَّمَا اغْتَسَلَ فَنَامَ وَرُبَّمَا تَوَضَّأَ فَنَامَ ‏‏.‏‏