When the Prophet ﷺ finished his prayer, if I was awake he would talk with me, and if not, he would lie down until the call to prayer was made.
إن النبي ﷺ كان إذا صلى فإن كنت مستيقظة حدثني وإلا اضطجع حتى يؤذن بالصلاة.
Bukhari related it in the Book of Tahajjud (1161), and Muslim in the Book of the Prayer of Travelers (743), both from the hadith of Sufyan bin Uyayna, who said, Salim Abu Nadr narrated to me, from Abu Salama, from Ayesha, who said, and then she mentioned it.I say, this is how Bukhari titled the chapter. Hafiz said in al-Fath, "By this title he indicated that ﷺ did not maintain this practice regularly, and the scholars used this as evidence against its obligatory nature, interpreting the command found in the hadith of Abu Hurairah, recorded by Abu Dawud and others, as recommendation rather than obligation. The benefit of this is rest and vigor for the dawn prayer. Accordingly, this is only recommended for one who performs tahajjud, and Ibn Arabi affirmed this view." End of quote.Furthermore, if lying down is considered recommended by anyone, then let him lie down at home, but not in the masjid. Ibn Umar used to throw pebbles at anyone who lay down in the masjid.