Dogs will lick things like the carpet when their stomach is upset. I'd assume that is why he is doing that. Have you gone to the vet to find out what is wrong? It could be some food that doesn't agree with him. Has he always have stomach problems? Ginger is good for the stomach, my BF has Crohn's and takes it daily, he says it helps. But you really need to find out why his stomach is upset.