The Prophet ﷺ had a mat which he used to spread during the day and use as a curtain at night. So a number of people gathered at night facing it and prayed behind him.
أَنَّ النَّبِيَّ ﷺ كَانَ لَهُ حَصِيرٌ يَبْسُطُهُ بِالنَّهَارِ وَيَحْتَجِرُهُ بِاللَّيْلِ فَثَابَ إِلَيْهِ نَاسٌ فَصَلَّوْا وَرَاءَهُ