It sounds like worms go get e=some dewormer and try this and this don't work then go to the vet in case he got into something.and it might have gotten stuck in his stomach and it can't get out so he needs to go to the vet before he gets any worse.this could be very dangerous to him so please go to the vet.they can do an x-ray and see what is in his stomach. Good luck!!
I would take him to the vet, it sounds like he might of ingested something, especially if his stomach is painful to touch. I wouldn't wait, he could of been poisoned by something or someone. Good-Luck