The Messenger of Allah ﷺ used to seclude himself in the mosque, and he would lean his head ﷺ toward me so I could comb his hair, while I was menstruating.
حدثنا يحيى حدثنا هشام حدثني أبي
كان رسول الله ﷺ يجاور في المسجد فيصغي إلي رأسه ﷺ فأرجله وأنا حائض
Its isnad is sahih. Bukhari related it 1/41 no. 295 (Fath), and Muslim 1/244 no. 297, both in the Book of Menstruation. Abu Dawud related it 2/332 no. 2469, and Tirmidhi 3/158 no. 804, saying, hasan sahih, both in the Book of Fasting.