Yes, believe it or not, there was a study on this.  The New Zealand Medical Journal published the results of the study on Friday, saying that it was more healthy for people to fart while in flight than to hold it in.

There were some particularly enlightening statements made in the study that were just too good not to share.

(Holding back) holds significant drawbacks for the individual, such as discomfort and even pain, bloating, dyspepsia (indigestion), pyrosis (heartburn) just to name but a few resulting abdominal symptoms

However, for pilots, the story is very different.

On the one hand, if the pilot restrains a fart, all the drawbacks previously mentioned, including impaired concentration, may affect his abilities to control the plane.  On the other hand, if he lets go of the fart, his co-pilot may be affected by its odour, which again reduces safety onboard the flight.

In a piece that sounds more like something out of Mythbusters and less like something that you would read in a study, the authors go on to suggest that charcoal be used in airplane seats to cut down on the odor.  They also suggest using it in pants, as that would also help.  (Now, there's something you want to go shopping for)

While this is a study that took place in New Zealand, we do know that far more interesting things have been studied by American "experts" that have told us about the dangers of eating too much or the definitive problems of cow flatulence on the environment.

Still, it has to make you feel a little better that you may now let loose on the airplane.  You have the permission of the New Zealand Medical Journal.  That is, you can do that until the TSA decides you can't.