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
Hadith No. 287
Sahih al Bukhari