I asked Ayesha whether the Messenger of Allah ﷺ used to sleep while in a state of major ritual impurity. She replied, "Yes, but he would not sleep until he had washed his private parts and performed ablution as he did for prayer."
حدثنا يزيد قال أخبرنا محمد
سألت عائشة هل كان رسول الله ﷺ ينام وهو جنب قالت نعم ولكنه كان لا ينام حتى يغسل فرجه ويتوضأ وضوءه للصلاة