I asked `Aisha "Did the Prophet (ﷺ) use to sleep while he was Junub?" She replied, "Yes, but he used to perform ablution (before going to bed).
Sahih al-Bukhari Book 5, Hadith 38