Someone asked the Messenger of Allah ﷺ, "Can one of us sleep while in a state of major impurity?"He replied, "Yes, if he performs ablution."
حدثنا نصر بن علي الجهضمي حدثنا عبد الأعلى حدثنا عبيد الله بن عمر عن نافع عن ابن عمر أن
لرسول الله ﷺ أيرقد أحدنا وهو جنب قال نعم إذا توضأ
Sahih Muslim recorded it in the Book of Menstruation, in the chapter on the permissibility of a person in a state of major impurity sleeping and the recommendation of wudu for him, etc., hadith no. 306, from the hadith of Ubaydullah, through this same chain.