(27) باب الْجُنُبِ يَتَوَضَّأُ ثُمَّ يَنَامُ
Narrated `Aisha:
Whenever the Prophet (ﷺ) intended to sleep while he was Junub, he used to wash his private parts and perform ablution like that for the prayer.
Reference: Sahih al-Bukhari 288
In-book reference: Book 5, Hadith 40
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 1, Book 5, Hadith 286