It is narrated from Umm al-Mu'mineen Sayyidah Aisha (may Allah be pleased with her): "The Messenger of Allah (peace be upon him) would be observing i'tikaf in the mosque and would extend his blessed head towards my room, and I would wash it while I was in the state of menstruation."
Hadith Referenceالسنن المأثورة / باب ما جاء في الأذان / 142
Hadith Takhrijسنن ابی داؤد، الصوم، باب المعتكف يدخل البيت لحاجته، رقم: 2469، وقال الالبانی: صحيح؛ سنن ابن ماجہ، الطهارة، باب الحائض تتناول الشئى من المسجد، رقم: 633