It was narrated from Zaid bin Thabit that :
The Prophet (ﷺ) used some palm fiber mats to section off a small area in the masjid. And the Messenger of Allah (ﷺ) prayed in it for several nights until the people gathered around him. Then, one night they did not hear his voice, and they thought that he was sleeping, so they cleared their throats to make him come out to them. He said: 'You kept doing that until I feared that it would be made obligatory for you, and if it were made obligatory, you would not be able to do it. O people, pray in your houses, for the best prayer a person offers is in his house, apart from the prescribed (obligatory) prayers.'