Ayesha reported,

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.

Bukhari 288

Sahih

حدثنا يحيى بن بكير قال حدثنا الليث عن عبيد الله بن أبي جعفر عن محمد بن عبد الرحمن عن عروة

عن عائشة قالت

كان النبي ﷺ إذا أراد أن ينام وهو جنب غسل فرجه وتوضأ للصلاة

البخاري 288صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Ghusl
Chapter
One in a state of major impurity performs wudu then sleeps
Numbering
Darussalam 288
Bukhari 288