Some women experience abdominal bloating (distention) and gas during their menstrual cycle, due to fluctuating hormone levels. Specifically, we're looking at you, ovarian hormones.
While fingers are usually pointed at progesterone as the hormone behind menstruation-related gastrointestinal problems, the inner lining of your stomach and small intestine contain estrogen receptors. Rising levels of estrogen have been found to mess with how well your GI tract does its job -- it slows things down, causing a build-up of air and gases in the intestinal tract, constipation and flatulence. (Testosterone does not seem to be linked to gassiness.)
Additionally, you'll find yourself farting more frequently if you develop problems with your pancreas, which produces the hormones and enzymes your body needs to properly break down the foods you eat.