The Messenger of Allah ﷺ said, "Pray in your houses, and do not turn them into graves."
أخبرنا العباس بن عبد العظيم قال حدثنا عبد الله بن محمد بن أسماء قال حدثنا جويرية بن أسماء عن الوليد بن أبي هشام عن نافع أن
قال رسول الله ﷺ صلوا في بيوتكم ولا تتخذوها قبورا
Bukhari transmitted it, in the Book of Prayer, chapter on the dislike of praying in graveyards, hadith no. 432, 1187, and Muslim, in the Book of the Prayer of Travelers, chapter on the recommendation of praying voluntary prayers at home and the permissibility of doing so in the masjid, and so on, hadith no. 777, from the hadith of Nafi, through him, and it is also in Kubra, 10290.