(Imām Bukhārī narrates): Yahya bin Bukair narrated to us, he says: Laith narrated to us, from Ubaidullah bin Abi Ja'far, from Muhammad bin Abdur Rahman, from Urwah, from Hazrat Aisha (may Allāh be pleased with her), she says that
when the Prophet ﷺ intended to sleep and was in a state of janabah, he would wash his private part and perform the wudu of prayer.
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي جَعْفَرٍ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ
قَالَتْ كَانَ النَّبِيُّ صلى الله عليه وسلم إِذَا أَرَادَ أَنْ يَنَامَ وَهْوَ جُنُبٌ، غَسَلَ فَرْجَهُ، وَتَوَضَّأَ لِلصَّلاَةِ.
Reference: Sahih Al Bukhari 288