I and the Messenger of Allah ﷺ used to sleep under a single garment while I was menstruating. If any of my blood got on it, he would wash that spot without going beyond it, then pray in it. He would return to bed, and if any blood got on it again, he would do the same, washing only that spot without going beyond it, and pray in it.
أخبرنا محمد بن المثنى قال حدثنا يحيى بن سعيد عن جابر بن صبح قال سمعت خلاسا يحدث
كنت أنا ورسول الله ﷺ نبيت في الشعار الواحد وأنا طامث أو حائض فإن أصابه مني شيء غسل مكانه ولم يعده وصلى فيه ثم يعود فإن أصابه مني شيء فعل مثل ذلك ولم يعده وصلى فيه
[Its chain of transmission is hasan] Abu Dawud reported it in Kitab al-Taharah, chapter on a man engaging in something less than intercourse with her, hadith no. 2166/269, through the hadith of Yahya Qattan, and it is in al-Kubra, hadith no. 276.