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."
Sahih al-Bukhari Book 5, Hadith 39