Typical talk for kids...I would set some limits around this, though. Do you want him to mention these things at school or at the dinner table, etc? Then come up with some firm guidelines (fine with your friends, in your room, etc.) and then some reasonable consequences. This is about respecting the environment they are in. School? Not appropriate? Home, playing with a friend? Fine.
When it happens, don't overreact, just make it clear what the consequence is. If it were me, I'd likely take away one tv show per bodily reference made in an inappropriate place.So, if he's trying to 'impress' grandma, then he loses an hour of tv. I think it's reasonable at this age to let them know some things are for at-home family only. My almost-five year old understands this.
With the gas, I wonder as someone else asked, if there's a specific food causing it. Hard boiled eggs are often a culprit. Beans, mushrooms, onions and garlic, some dairy or soy... they can all do it. Probiotics are beneficial in any case. Also, if you do find the offending food, if he can swallow a pill whole, I'd try offering him one charcoal capsule. It traps/absorbs gas. (His poop will be black a day or so later--don't be alarmed.) Certain foods contain certain kinds of sugars which cause gas for some of us.
Good luck!