Umar asked the Messenger of Allah ﷺ, "Can one of us sleep while in a state of major ritual impurity?"He replied, "Yes, if he performs ablution."
حدثنا يحيى بن سعيد عن عبيد الله أخبرني نافع
أن عمر سأل رسول الله ﷺ أينام أحدنا وهو جنب قال نعم إذا توضأ
Its isnad is sahih, and it was narrated by the group (al-Jamaah), as noted in al-Muntaqa, 360.