Get Pet Questions Answered by Pet Experts
It really sounds like he ate something or has some gastritis. You can prove it by changing his diet to a bland food like boiled chicken and rice or boiled hamburger and rice. Eliminate all treats and table scraps during this time. If it clears up, you can be that he stold something from the trash or had a piece of table food that did not agree with him.
As the symptoms improve, start to mix his regular food back in and he should be just fine.
If not, you might be dealing with a parasite problem.
Let me know if you have more questions.