If an aircraft decompresses at altitude will everyone start farting? From what I understand about how gases and liquids work, if the environment loses pressure, then it causes dissolved gases to come out of solution. For example, if a diver ascends too quickly, dissolved nitrogen will come out of solution causing the "bends".

I have heard that astronauts undergoing decompression training experience gastrointestinal distress from the effect.

Does this mean that if an aircraft at altitude suddenly decompresses that everybody will start farting?
No, they will not.

In the case of a rapid decompression, an aircraft will make a very rapid descent to a altitude, and while I'm not a physician or an expert on these physiological and biochemical processes, I doubt very much that would be enough time for dissolved gases to be released into the digestive tracts.

Even if it were, a person who experiences a sudden accumulation of gas in the gastrointestinal tract may experience discomfort or even pain, but it takes a while for gas to make its way to an exit - as anyone who has suffered from trapped wind will know.