eating lots of grass can make dogs vomit; it's a natural instinct for them to start eating grass when they feel ill as it makes them vomit and theoretically rid their bodies of what has made them ill.
it might be an idea to take him to the vet for a check-up or just wait for a week or so and see if it hapens again in the meantime. Maybe look back to see if he ate anything or could have eaten anything that hasn't aggreed with him. Have you changed his food recently? Did he get sneaky dinner table scraps?