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.
Sahih al-Bukhari Book 10, Hadith 124