Hadithcore
Sahih Muslim, 295
sahih

Kuraibthe freed slave of Ibn Abbas, reported:

I heard it from Maimuna, the wife of the Messenger of Allah (ﷺ): The Messenger of Allah (ﷺ) used to lie with me when I menstruated, and there was a cloth between me and him.

حَدَّثَنِي أَبُو الطَّاهِرِ، أَخْبَرَنَا ابْنُ وَهْبٍ، عَنْ مَخْرَمَةَ، ح وَحَدَّثَنَا هَارُونُ بْنُ سَعِيدٍ الأَيْلِيُّ، وَأَحْمَدُ بْنُ عِيسَى، قَالاَ حَدَّثَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي مَخْرَمَةُ، عَنْ أَبِيهِ، عَنْ كُرَيْبٍ، مَوْلَى ابْنِ عَبَّاسٍ قَالَ سَمِعْتُ مَيْمُونَةَ، زَوْجَ النَّبِيِّ صلى الله عليه وسلم قَالَتْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَضْطَجِعُ مَعِي وَأَنَا حَائِضٌ وَبَيْنِي وَبَيْنَهُ ثَوْبٌ ‏.‏

References2 variants
In-Book Reference
Book 3, Hadith 4
USC-MSA web (English) reference
Book 3, Hadith 580 (deprecated numbering scheme)
Sharh · explanationclick to expand
Allah said, "And they ask you about menstruation. Say, 'It is an annoyance. So keep away from women during menstruation, and do not approach them until they are purified.'" (Al-Baqarah: 222) Thus, Allah forbade sexual intercourse during menstruation, but it is permissible to do anything other than penetration during this period as Maimouna, Mother of the Believers, narrated in this hadith that the Prophet (ﷺ) used to lie down with her (a metaphor for intercourse) while she was menstruating but there was a garment in between. This is explained by Abu Daoud's narration that one of the Prophet's wives said, "When the Prophet wanted to do something (i.e. kissing, embracing) with (his) menstruating wife, he would put a garment on her private part.”.