Even though bloating can be caused by gas creating foods and bacterial overgrowth, my main cause of bloating are spasms throughout the intestines. Think of a garden hose with a kink in it: Pressure builds up at the kink just like gas will build up.
I take Donnatal or Hyoscyamine to relax the intestines, I also lie on one side and gently massage and reposition the intestines, then to the other side.
A useful Yoga position is to lie down, face up, bring the knee up.
With your hand and arm, bring the knee across the abdomen all the way to the other side, even go with the spine in that direction a little bit. This major movement will cause the abdomen to relax and "push gas" downward. Do it gently a few times. Then do it with the other knee in the other direction.
The other position is to clasp the knee with both hands and press it into your abdomen, gently.
Walking, or if you have a stationary bike will make the bowels active and move, those thighs going up and down really signal to the abdomen: get moving !