Reference: Fataawa li Ahlil-Mayyit – Question 27, Page 30
Fataawa al-Lajnah ad-Daa.imah lil-Buhooth al-‘Ilmiyyah wal-Iftaa – Volume 9, Page 93
Question: Is it permissible to stand by the graveside and seek forgiveness and supplicate for the deceased after burying him, and [likewise] to place/throw sand/earth over the grave?
Response: Yes, it is permissible to stand by the graveside after burying the deceased, and [likewise] to place/throw sand/earth over the grave and seek forgiveness and supplicate for him. Rather, this is recommended, as Abu Daawood transmits and al-Haakim authenticates on the authority of ‘Uthmaan (radhi-yAllaahu ‘anhu) who narrated that: When the Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam) completed burying the deceased he used to stand by him (the graveside) and say:
«Seek forgiveness for your brother, and beg steadfastness for him, for he will be questioned now».
And with Allaah lies all the success, and may Allaah send prayers and salutations upon our Prophet Muhammad (sal-Allaahu ‘alayhi wa sallam) and his family and his companions.