I've often wondered if it has something to do with the cabin air pressure and humidity - just over the past year or two I've noticed I've become quite the gas ball after dinner and breakfast on longhaul overnight flights. After touchdown one good trip to the loo a couple hours later usually clears things out.
Doesn't seem to matter what foods I eat or avoid either...
The part I hate is going to the toilet, farting so loud I think the entire cabin must be hearing me, then sure enough, as soon as I get back to my seat and settle for a snooze, I'll be damned if I don't have to increase airspeed yet again!
So far have managed to avoid killing off the entire cabin, but it's always a worry!