An average human body has about 32 million bacteria on it, mercifully the vast majority of them are harmless to us. Bacteria can be found both inside and outside our body and particularly, in our gastrointestinal tract (our gut). Bacteria can be a cause of stomach upsets and discomfort, nine times out of ten we experience bloating or abdominal distension because of bacteria frantically trying to digest food. If a particular food is stubborn and not easily broken down, the bacteria will give off an excessive quantity of Carbon Dioxide and Hydrogen which results in that familiar rumbling and bloating sensation in your stomach.
Try introducing a Bifidobacterium such as a probiotic drink or capsule (note that the type of 'good' bacteria varies from brand to brand) into your diet as these do not expel gas during the digestive process, therefore the introduction of a 'good' bacteria results in competition for binding sites with 'bad' bacteria within the intestine, consequently there is less room for bad bacteria meaning the accumulation of gas in the bowel should decrease!
NOTE: A probiotic bacteria can take several weeks to begin to accommodate adequate binding sites, therefore you may need to consume them for a month or so before you notice any obvious benefit.