Imam Bukhari narrates: Yahya bin Salih narrated to us, he says: Fulaih bin Sulaiman narrated to us from Saeed bin al-Harith, he narrates that
we asked Hazrat Jabir bin Abdullah, may Allāh be pleased with them both, about praying in one cloth, so he said: I went with the Prophet ﷺ on some journey, then I came to him at night because of some work of mine, and I found him praying, and upon me at that time was (only) one cloth. I wrapped it around myself and began praying to one side of him. When he finished the prayer, he said: O Jabir! For what have you come at night? So I informed him of my need, then when I had finished, he said: What is this cloth that I see wrapped around you? I said: This cloth was narrow. He said: If the cloth is wide then wrap it around yourselves, and if it is narrow then tie it as a waist-wrap.
Reference: Sahih Al Bukhari 361