Our family recently unveiled the headstone on my mother's grave. Before the unveiling service, my elder brother told me NOT to walk over the grave of my mother. Through lack of space it was impossible to assemble the relatives together so as NOT to stand on the grass over her grave. Is there a law or custom not to walk on the graves of the dead? If so, why are gravestones not placed horizontally on top of the earth, rather than vertically at the head of the grave? Is the custom different in Israel?
Nit'e Gavriel, Mourning volume 2, chapter 87, paragraphs 11–12 (page 669):
It's forbidden to tread on graves. However, if one needs to walk to a certain grave and has no path [thither] unless he treads on graves, it's permitted.
[If] people are visiting graves and it's no longer possible to recognize the form of a grave, especially in old graveyards, one may trample other graves to reach the righteous person's site.
And chapter 66, paragraph 25:
There are places where they make gravestones lying, specifically, and not standing. That's the custom in Israel. Outside of the Land [of Israel], for the most part, the custom is to make gravestones standing.
See his footnotes for citations and reasons.
Oh, and chapter 66 (about gravestones), paragraph 19:
One should not stray from the local custom.