Offering supplication for the deceased after the burial is Sunnah
Question

What is the ruling on standing at the graveside after the burial and offering supplication for the deceased?
Praise be to Allah.Offering supplication for the deceased after the burial is Sunnah, because of the report narrated by Abu Dawud from `Uthman ibn `Affan (may Allah be pleased with him), who said: When the Prophet (blessings and peace of Allah be upon him) had finished burying a deceased person, he would stand over him and say: “Pray for forgiveness for your brother, and ask that he be made steadfast, for he is being questioned now.” (Al-Albani classed it as authentic in Sahih Abu Dawud)
Ash-Shawkani (may Allah have mercy on him) said: This hadith indicates that it is prescribed to pray for forgiveness for the deceased when the burial is finished, and to ask that he be made steadfast, because he is being questioned at that time. (End quote from Nayl Al-Awtar, 4/110).
Ibn Al-Mundhir (may Allah have mercy on him) said: The majority of scholars said that offering supplication is prescribed. Al-Ajurri and others said: It is recommended to stand [at the graveside] for a short while after the burial and offer supplication for the deceased… At-Tirmidhi said: Standing at the graveside and praying for the deceased at the time of burial is an extra supplication for the deceased after offering the funeral prayer for him, because the prayer of a congregation of Muslims is like a gathering for his sake, like people who have gathered at the door of the king, interceding for him. Standing at the graveside and asking that the deceased be made steadfast is like extra support for those who want to intercede for him, for that is the time when the deceased is tested, for he is now facing the terrifying moment in the grave and the questioning of the two angels. (End quote from Hashiyat Ar-Rawd by Ibn Al-Qasim, 3/124).
It says in Al-Mawsu`at Al-Fiqhiyyah (4/41): Praying for forgiveness is a verbal act of worship which it is valid to do for the deceased… Following the burial, it is recommended for a group of people to stand and pray for forgiveness for the deceased, for at that moment he is being questioned by Munkar and Nakir… This was stated by the majority of jurists. (End quote)
Shaykh Ibn Baz (may Allah have mercy on him) said: Offering supplication for the deceased after the burial, asking that he be made steadfast and be forgiven, is Sunnah. (End quote from Majmu` Al-Fatawa, 13/205).
Shaykh ibn `Uthaymin (may Allah have mercy on him) said: Standing at the graveside after the burial and offering supplication for the deceased is Sunnah, because when the Prophet (blessings and peace of Allah be upon him) had finished burying the deceased, he stood at the graveside and said: “Pray for forgiveness for your brother, and ask that he be made steadfast, for right now he is being questioned.” (End quote from Liqa Al-Bab Al-Maftuh, no. 118).
And Allah knows best.