The Prophet ﷺ said, "Pray in your homes, and do not turn them into graves."
حدثنا إسحق بن منصور أخبرنا عبد الله بن نمير عن عبيد الله بن عمر عن نافع
عن النبي ﷺ قال صلوا في بيوتكم ولا تتخذوها قبورا
Agreed upon [by Bukhari and Muslim]. Bukhari related it in the Book of Prayer, Chapter on the dislike of praying in graveyards, hadith no. 432, and Muslim, hadith no. 777, from the hadith of Ubaydullah bin Umar, with the same wording.