One thing you can do to prevent farts is to cut down on the amount of alfalfa in your diet. But giving up all those other legumes, including peas, peanuts, lentils, and the dozens of kinds of beans, would be too much to ask. It’s just one of those many times in life when we have to balance the benefits against the risks.
Leguminous plants are those that produce their seeds in pods. Nutritionally, legumes (as the seeds are called) are high in protein and contain many, but not all, of the essential amino acids. The problem is that they also contain certain complex carbohydrates (raffinose oligosaccharides, among others) that humans unfortunately lack the enzyme to digest.
We say “unfortunately” because those carbohydrates pass straight through the stomach and small intestine to the lower bowel, where bacteria feed on them, producing various gases, odorless carbon dioxide, hydrogen, and methane, seasoned with highly odorous hydrogen sulfide and other sulfur-containing compounds called mercaptans. These gases, finding themselves already in our nether regions, depart the body via the nearest exit.
Unfortunately (again), none of several recommendations for circumventing these ventings has been proven to be dependably effective, including rinsing the beans several times before cooking, or cooking them along with any one of a variety of herbs, such as epazote, that supposedly reduce the gas. And perhaps on the theory that the best defense is a good offense, some people say that the more beans you eat on a regular basis, as is done in countries where beans are a staple, the less your social reputation will be sullied.
Because both beans and people vary so much, it would be difficult to carry out the controlled scientific experiments that would be necessary to determine the efficacy of these strategies. One would have to measure the bean inputs of a large number of people under various conditions and measure the volumes of their gaseous outputs. I, as one scientist, shall not volunteer to do that experiment. Nevertheless, as is the case with many folk practices that lack scientific substantiation, people believe what they want to believe. And who’s to say no?
One defense against your chemical weapons of mass eruption is Beano or one of the other commercial products that supply the digestive enzyme (alpha-galactosidase) our systems lack.
Another measure that apparently works in many people is swallowing capsules of charcoal, which adsorbs gas in the intestine. (Yes, that’s adsorb with a d, not absorb with a b. The gas molecules diffuse into the extensive interior surfaces of the highly porous charcoal grains and adhere there. That adherence phenomenon is called adsorption.)
Both Beano and charcoal capsules are available without prescription. They’re worth a try in an emergency, such as when you’ve had bean burritos for breakfast before church.
In the end (if you’ll pardon the metaphor), there’s really not much you can do beyond letting nature take its course and saying, “Who, me?”