[Machine] I asked Aisha, "How did the Messenger of Allah ﷺ behave when he was in a state of janabah (major ritual impurity)? Would he take a bath before sleeping, or did he sleep before taking a bath?" She said, "He would sometimes take a bath and then sleep, and sometimes he would perform ablution (wudu) and then sleep." I said, "All praise is due to Allah, who made this matter flexible." This hadith was narrated by Muslim in his Sahih from Qutaybah, and Ghudayf ibn al-Harith narrated from Aisha as well.
سَأَلْتُ عَائِشَةَ قُلْتُ كَيْفَ كَانَ رَسُولُ اللَّهِ ﷺ يَصْنَعُ فِي الْجَنَابَةِ أَكَانَ يَغْتَسِلُ قَبْلَ أَنْ يَنَامَ أَوْ يَنَامُ قَبْلَ أَنْ يَغْتَسِلَ؟ قَالَتْ «كُلُّ ذَلِكَ كَانَ يَفْعَلُ رُبَّمَا اغْتَسَلَ فَنَامَ وَرُبَّمَا تَوَضَّأَ فَنَامَ» قُلْتُ الْحَمْدُ لِلَّهِ الَّذِي جَعَلَ فِي الْأَمْرِ سَعَةً رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ قُتَيْبَةَ وَلَمْ يَذْكُرْ شَوَاهِدَهُ بِأَلْفَاظِهَا وَقَدْ تَابَعَهُ غُضَيْفُ بْنُ الْحَارِثِ عَنْ عَائِشَةَرواه مسلم