Abdullah bin Abu Qays reported,

I asked Ayesha about the witr prayer of the Messenger of Allah ﷺ, and she mentioned the hadith.I said, "How did he handle ritual impurity? Would he bathe before sleeping, or sleep before bathing?"She replied, "He did both. Sometimes he would bathe and then sleep, and sometimes he would only perform ablution and then sleep."I said, "Praise be to Allah, who has made the matter accommodating."

Muslim 705

Sahih

حدثنا قتيبة بن سعيد حدثنا ليث عن معاوية بن صالح

عن عبد الله بن أبي قيس قال

سألت عائشة عن وتر رسول الله ﷺ فذكر الحديث قلت كيف كان يصنع في الجنابة أكان يغتسل قبل أن ينام أم ينام قبل أن يغتسل قالت كل ذلك قد كان يفعل ربما اغتسل فنام وربما توضأ فنام قلت الحمد لله الذي جعل في الأمر سعة

مسلم 705صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Menstruation
Chapter
Permissibility of a junub sleeping, recommendation of wudu for him, and washing the private parts if he wants to eat, drink, sleep, or have intercourse
Numbering
Darussalam 705
Muslim 705