I agree it is the diet- but my 7 yr old girl has bad gas sometimes and does not consume any dairy whatsoever.
I find foods that stay a long time in the gut/intestines have a greater chance to create bacteria and then gas.
Lots of foods can cause gas, but the big culprit is gluten in our family- that's why we are off gluten for one thing. (sometimes we cheat on our diet...and suffer!) But we eat lots of broccoli- and it give us some gas.
You might want to keep a diary of everything he eats and drinks normally and then research each food- is it a trigger or not.
I know fiberous foods, like fruit help move the bowels faster, and get the food out before fermentation! Know what I mean?
I'm no scientist, but this is just what we have learned.
We do Natural Calm each day, and that helps them relax and poop more regularly. I have learned that on a healthy diet, you should poop about 12 hrs after each meal. So breakfast should be coming after dinner, dinner comes the next morning.
does that make sense?
hope I helped a bit.
Mama to 5 babies. UCer, too!