كتاب الحيض
3  
The Book of Menstruation
(16)
Chapter: Covering oneself with a garment and the like while performing ghusl
(16)
باب تَسَتُّرِ الْمُغْتَسِلِ بِثَوْبٍ وَنَحْوِهِ ‏‏
Sahih Muslim 336 b

Umm Hani b. Abu Talib reported:

It was the day of the conquest (of Mecca) that she went to the Messenger of Allah (ﷺ) and he was staying at a higher part (of that city). The Messenger of Allah (ﷺ) got up for his bath. Fatimah held a curtain around him (in order to provide him privacy). He then put on his garments and wrapped himself with that and then offered eight rak'ahs of the forenoon prayer.
حَدَّثَنَا مُحَمَّدُ بْنُ رُمْحِ بْنِ الْمُهَاجِرِ، أَخْبَرَنَا اللَّيْثُ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ سَعِيدِ بْنِ أَبِي هِنْدٍ، أَنَّ أَبَا مُرَّةَ، مَوْلَى عَقِيلٍ حَدَّثَهُ أَنَّ أُمَّ هَانِئٍ بِنْتَ أَبِي طَالِبٍ حَدَّثَتْهُ أَنَّهُ، لَمَّا كَانَ عَامُ الْفَتْحِ أَتَتْ رَسُولَ اللَّهِ صلى الله عليه وسلم وَهُوَ بِأَعْلَى مَكَّةَ ‏.‏ قَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِلَى غُسْلِهِ فَسَتَرَتْ عَلَيْهِ فَاطِمَةُ ثُمَّ أَخَذَ ثَوْبَهُ فَالْتَحَفَ بِهِ ثُمَّ صَلَّى ثَمَانَ رَكَعَاتٍ سُبْحَةَ الضُّحَى ‏.‏
Reference : Sahih Muslim 336b
In-book reference : Book 3, Hadith 87
USC-MSA web (English) reference : Book 3, Hadith 664
  (deprecated numbering scheme)