When the Prophet ﷺ wished to sleep while in a state of major ritual impurity, he would wash his private parts and perform ablution as he would for prayer.
حدثنا يحيى بن بكير قال حدثنا الليث عن عبيد الله بن أبي جعفر عن محمد بن عبد الرحمن عن عروة
كان النبي ﷺ إذا أراد أن ينام وهو جنب غسل فرجه وتوضأ للصلاة