Language:
كتاب الاعتكاف
33  
Retiring to a Mosque for Remembrance of Allah (I'tikaf)
(19)
Chapter: A Mu'takif can let his head in the house for washing
(19)
باب الْمُعْتَكِفِ يُدْخِلُ رَأْسَهُ الْبَيْتَ لِلْغَسْلِ
Sahih al-Bukhari 2046

Narrated `Urwa:

Aisha during her menses used to comb and oil the hair of the Prophet (ﷺ) while he used to be in I`tikaf in the mosque. He would stretch out his head towards her while she was in her chamber.

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