The Prophet (ﷺ) used to pray while I used to sleep beside him during my periods (menses) and in prostration his garment used to touch me.
Sahih al-Bukhari Book 8, Hadith 165