from my buddies' wife who is a dietician/nutritionist-
homebrew farts mainly from yeast. these are not the same yeast you regularly have in your guts, so they can cause some disturbance if they crash your gut party. can also be from unfermentables as these will be eaten by stuff in your guts.
BMC farts- typically they are from drinking too much, which annoys the lining of your intestines. long story short- intestinal lining stops keeping everything inside intenstines, gets leaky. no bueno. this is the "sour" beer fart. ( this also happens on a small but chronic, daily level from emulsifiers, which are in a ton of foods- ice creams, processed foods with dairy, salad dressings, etc.)
also- she noted that one of the worst things you can do for your health is eat a ton of food, drink a ton of beer, and then pass out. since your body sees alcohol as a toxin, it prioritizes dealing with it over the processing of food. so basically, your food can start fermenting and going a bit rotten in your guts since its passage is slowed down. beer butt, sour farts, hangover diarrhea, etc.