What you eat can also play a big role in gas and bloating. Some foods are naturally more likely to cause gas - beans, cruciferous veggies. Also, if you have an overgrowth of bad gut bugs, any foods high in carbs/sugars can cause gas. If you're lactose or fructose intolerant, consuming foods that contain either can cause gas. Best thing you can do is keep a food journal and track the foods that seem to be your personal offenders.
Taking digestive enzymes can help you more fully digest the foods you eat, so there's less undigested matter to feed the bad gut bacteria. I also agree that probiotics can help as they will rebalance the gut ecology. Custom Probiotics and Natren have worked well for me.
Diagnosed with ulcerative colitis spring 1999. Have been in remission for years with only a few minor blips.
Maintenance dose sulfasalazine. Probiotics, vitamin D, fiber supplement and fish oil caps. George's aloe vera juice and l-glutamine for gut healing. Mostly grain-free and dairy-free low carb diet.