Language:
كتاب الاعتكاف
33
Retiring to a Mosque for Remembrance of Allah (I'tikaf)
(4)
Chapter: The taking of a bath by a Mu'takif.
(4)
باب غَسْلِ الْمُعْتَكِفِ
Sahih al-Bukhari 2030, 2031

Narrated `Aisha:

The Prophet (ﷺ) used to embrace me during my menses. He also used to put his head out of the mosque while he was in I`tikaf, and I would wash it during my menses.

حَدَّثَنَا مُحَمَّدُ بْنُ يُوسُفَ، حَدَّثَنَا سُفْيَانُ، عَنْ مَنْصُورٍ، عَنْ إِبْرَاهِيمَ، عَنِ الأَسْوَدِ، عَنْ عَائِشَةَ ـ رضى الله عنها ـ قَالَتْ كَانَ النَّبِيُّ صلى الله عليه وسلم يُبَاشِرُنِي وَأَنَا حَائِضٌ‏.‏ وَكَانَ يُخْرِجُ رَأْسَهُ مِنَ الْمَسْجِدِ وَهْوَ مُعْتَكِفٌ فَأَغْسِلُهُ وَأَنَا حَائِضٌ‏.‏
Reference : Sahih al-Bukhari 2030, 2031
In-book reference : Book 33, Hadith 6
USC-MSA web (English) reference : Vol. 3, Book 33, Hadith 247
  (deprecated numbering scheme)