Sahih al-Bukhari Book 33, Hadith 6
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.
(the wife of the Prophet) Allah's Messenger (ﷺ) used to let his head in (the house) while he was in the mosque and I would comb and oil his hair. When in I`tikaf he used not to enter the house except for a need.
`Umar asked the Prophet (ﷺ) "I vowed in the Pre-Islamic period of ignorance to stay in I`tikaf for one night in Al-Masjid al-Haram." The Prophet (ﷺ) said to him, "Fulfill your vow."