I heard from my maternal aunt Maymunah, the wife of the Prophet ﷺ, that she used to be in her menses and would not pray, while she lay stretched out beside the prayer place of the Messenger of Allah ﷺ as he prayed on his small mat. When he prostrated, part of his garment would touch me.In another narration, the Messenger of Allah ﷺ would pray while I was beside him in my menses, and sometimes his garment would touch me when he prostrated.In another narration, the Prophet ﷺ would pray while I was sleeping at his side.
سمعت خالتي ميمونة زوج النبي ﷺ أنها كانت تكون حائضا لا تصلي، وهي مفترشة بحذاء مسجد رسول الله ﷺ وهو يصلي على خمرته، إذا سجد أصابني بعض ثوبه. وفي رواية: كان رسول الله ﷺ يصلي وأنا حذاءه وأنا حائض، وربما أصابني ثوبه إذا سجد. وفي رواية: كان النبي ﷺ لا يصلي، وأنا إلى جنبه نائمة.
Bukhari related it in the Book of Purification (333) and in the Book of Prayer (379), and Muslim related it in the Book of Prayer (513), both of them through various routes from Sulayman Shaybani, from Abdullah bin Shaddad, who narrated the same account.This hadith has been cited as evidence that a woman does not invalidate the prayer. However, the wording of the hadith does not indicate that it is permissible to pass in front of someone praying, it only indicates that it is permissible to sit in front of the person praying or beside him.