Lead author Dr. Jacob Rosenberg, professor of surgery at the University of Copenhagen, said he always wondered why he had more flatulence flying than when on the ground. Then, after a recent trip, he opened his bag and noticed a water bottle "almost smashed by the change in ambient pressure," said Rosenberg. "And then I thought of the mechanisms of increased bowel air volume when flying."
It's simple. When altitude increases, pressure decreases. According to the thermodynamic principal known as the "ideal gas law," as pressure drops, volume increases. While cabins are pressurized to compensate, the mechanisms can only do so much. When the plane is at a cruising altitude of 33,000 feet, inside it's still the equivalent of 8,000 feet above sea level. That's a lot of physics bearing down on your intestines.
There's a clear medical rationale for releasing the gas. Holding back flatulence can lead to "discomfort and even pain, bloating, dyspepsia and pyrosis," according to the article, titled "Flatulence on Airplanes: Just Let it Go," which surveyed previously published research and studies. It also notes that holding back flatulence has been suggested as a major risk factor for diverticular disease, a condition where pouches develop in the wall of the colon.
Go ahead and fart, but just don't sit next to me on the airplane: Link - Thanks Tiff!