"The Prophet ﷺ would put his head out for me while he was performing I'tikaf [1] and I would wash it, when I was menstruating." [1] Mujawir ("next door") here means while performing I'tikaf. (Using translation from Nasāʾī 276)
كَانَ رَسُولُ اللهِ ﷺ «يُخْرِجُ إِلَيَّ رَأْسَهُ وَأَنَا حَائِضٌ فَأَغْسِلُهُ»