"The Messenger of Allah ﷺ used to put his head out of the Masjid while he was performing I'tikaf, and I would wash it, while I was menstruating." (Using translation from Nasāʾī 388)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ «يُخْرِجُ رَأْسَهُ مِنَ الْمَسْجِدِ وَهُوَ مُعْتَكِفٌ فَأَغْسِلُهُ وَأَنَا حَائِضٌ»