It is likewise unlawful to demean graves by walking over them, treading on them with one’s shoes, sitting upon them, turning them into dumping grounds for refuse, or allowing water to run across them. Muslim records on the authority of Abū Hurayrah—traced back to the Prophet—who said: “For one of you to sit on a burning coal that scorches his clothes and penetrates to his skin is better than to sit on a grave.”
Imam Ibn al-Qayyim (may Allah have mercy on him) observed: “Whoever reflects on the Prophet’s prohibition against sitting on, leaning against, or walking on a grave will realize that the ban is purely out of respect for those buried therein, lest people walk with their shoes over the heads of the deceased.”
Seventh: Rulings on offering condolences and visiting graves
It is recommended to console the bereaved, encourage him to be patient, and supplicate for the deceased. Ibn Mājah—through a chain of trustworthy transmitters—relates from ʿAmr ibn Ḥazm that the Prophet said: “No believer consoles his brother over a calamity except that Allah clothes him in garments of honor on the Day of Resurrection.” Other hadiths convey the same meaning.
The wording of consolation is to say: “May Allah magnify your reward, grant you the best solace, and forgive your departed.”
It is undesirable to hold formal condolence gatherings and publicize them as some people do today. Instead, it is recommended to prepare food for the family of the deceased and send it to them, for the Messenger of Allah said: