Sahih al-Bukhari, Book 5, Hadith 39 (Bukhari 286)

Narrated `Umar bin Al-Khattab:

I asked Allah's Messenger (ﷺ) "Can any one of us sleep while he is Junub?" He replied, "Yes, if he performs ablution, he can sleep while he is Junub."