I guess he must have been sitting there for an hour, so they got bored and walked off(probably bought an ice cream or lunch). So then when they realised he got up, they did the same and returned. Wouldn't you do the same, its his right to be alone at that time, or would you rather wait behind him for an hour or so.
Actually I think that they are not running up "again" but more like still.
The flashback was hours for us but could have been only a few seconds for him.
If that were the case then they would never have actually got there.
If you look closely at the names on the graves in the very beginning two of them are Martinez and someone else(I can't remember). Then his family runs up to help him when he breaks down, then the flashback happens. In the end when we see the old Ryan again he is in front of Capt Millers grave where he salutes him. I think that he was visiting all of the soldiers that he new that day and started out and someone else's grave and then finished at Capt Millers grave. I think that during the flashback they moved to different graves.
Went to get an ice cream? What are you talking about?! That's come straight from your imagination. Directors have slightly more sense than to let the audience make their own little story lines up, if indeed they do run up again then it is a slip up.