I asked Ayesha, "Mother, did 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."
حدثنا إسماعيل قال أخبرنا محمد بن عمرو
قلت لعائشة أي أمه أكان رسول الله ﷺ ينام وهو جنب قالت نعم لم يكن ينام حتى يغسل فرجه ويتوضأ وضوءه للصلاة