Can one of us sleep if he is junub? He said: ʿYes, if he does wudoo’ as for prayer.ʿ It was narrated from Ibn ʿUmar that ʿUmar asked the Prophet ﷺ... a similar hadeeth. (Using translation from Aḥmad 235)
أَنَّ عُمَرَ سَأَلَ رَسُولَ اللهِ ﷺ «أَيَنَامُ أَحَدُنَا وَهُوَ جُنُبٌ؟» قَالَ «نَعَمْ وَيَتَوَضَّأُ»