Baked beans are known to be nutritious and a good source of fibre and therefore good for your digestive system. However, as they work their way through your body they also produce the rather unfortunate effect of wind (or flatulence). The reason being is due to the sugars within the beans. The sugar molecules are too big for the small intestine to absorb or breakdown so they are moved through into the larger intestine. Here they are greeted by gut bacteria who break them down easily, but by doing so they produce gasses such as hydrogen and methane which naturally have to escape through your bottom as wind!
If however, you feel you suffer from excessive wind and bloating and it may not all be baked bean related some people are known to have sugar intolerances which in fact can be quite debilitating. A simply hydrogen and methane breath test can identify any problems within the gut and either a simply course of antibiotics or nutritional advise can put you on the path to a less windy, painful, upsetting and embarrassed existence.