Vomiting is not normal behavior for your pet, and something may be wrong. Most of the time, vomiting occurs when your dog has eaten something funky. He/she may have gotten into the garbage while you were sleeping, or found that candy bar you thought you stashed. Before you get worried, make sure you check to see if anything is missing, or your garbage has been dug through. If your dog only vomits once or twice and seems to be fine otherwise [active, hungry, thirsty etc...] it's safe to blame it on something he has digested, and move on. If your dog is constantly eating grass, having accidents, or seeming lethargic you may need to take steps to ensure he's not ill.
To prevent your dog from vomiting keep your food locked up, and your garbage shut! Don't leave anything that's harmful to dogs (grapes, chocolate...) on the counter where he can reach if you aren't around. If your dog seems to be suffering on a daily basis, try to limit food intake to once a day, and offer a antacid before that meal. A simple diet of brown rice, and chicken for a week until the stomach seems to settle is also a good idea; some dogs need a switch in diet, and one that's healthy but simple is ideal.
Disclaimers: It is not Dog Remedy's policy to provide, imply or dispense veterinary advice. Products found on our site are not meant to prevent, diagnose, treat or cure any disease. If you have any medically-related questions about your dog, we encourage you to consult your local veterinarian.