It can be IBS (irritable bowel syndrome). Pro biotics help. Especially homemade Yogurt (curd) with the liquid drained out through a thick net. You should experiment with avoiding certain foods like milk, pulses, meat and most importantly avoid all sorts of fast foods, potato chips, chocolates, sugar. Fry some Bitter gourd (bitter melon) and serve with rice. Avoid chili peppers and spicy foods.
Try the following
1 teaspoon powdered ginger, 1 teaspoon powdered cumin, 1 teaspoon powdered cinnamon. Combine all three, add some honey, and mix into a thick paste. Give one teaspoon three times a day. If this helps , i can give you another recipe to bring about further improvements. let me know.