It is narrated from Sayyidah Aishah (may Allah be pleased with her) that the Prophet (peace and blessings be upon him) would put his head out of the mosque towards me while he (peace and blessings be upon him) was in i'tikaf, and I would wash his (peace and blessings be upon him) blessed head while I was menstruating. (b) Sayyidah Umm Atiyyah (may Allah be pleased with her) reports from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) ordered the menstruating women to "keep away from the prayer of the Muslims." This hadith will come in the Book of the Two Eids.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1477