[Commentary]
These hadiths set out the virtues of certain verses and chapters of the Noble Quran, among them Sūrah al-Baqarah. The compiler—may Allah have mercy on him—quotes Abu Hurayrah (may Allah be pleased with him) who reported that the Prophet—peace and blessings be upon him—said, “Do not turn your homes into graveyards.”
The scholars explain that this means: do not neglect prayer in your houses—offer prayers there. He referred to homes where no prayer is performed as “graveyards” because prayer is not valid in a graveyard. The Prophet—peace and blessings be upon him—said, “The earth has been made a place of prayer for me, except for a graveyard and a bathhouse,” and he also said, “Do not pray facing graves and do not sit on them.”
Accordingly, no prayer—neither obligatory nor voluntary—nor sajdat al-tilāwah (the prostration of recitation), nor sajdat al-shukr (the prostration of gratitude), nor any other act of prayer is valid in a cemetery, with one exception: ṣalāt al-janāzah (the funeral prayer). If the funeral prayer is performed in the graveyard there is no harm, whether before the burial or after it— but once the deceased has been interred, it is no longer permissible.