18.28 . Restrain thyself along with those who cry unto their Lord at morn and evening , seeking His countenance ; and let not thine eyes overlook them , desiring the pomp of the life of the world ; and obey not him whose heart We have made heedless of Our remembrance , who followeth his own lust and whose case hath been abandoned .
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.
Allah's Apostle made a small room in the month of Ramadan (Sa'id said, "I think that Zaid bin Thabit said that it was made of a mat") and he prayed there for a few nights, and so some of his companions prayed behind him. When he came to know about it, he kept on sitting. In the morning, he went out to them and said, "I have seen and understood what you did. You should pray in your houses, for the best prayer of a person is that which he prays in his house except the compulsory prayers."