Dear XXXXXX:
This question was listed in the Pediatrics (under age 12 years) category: What is your son's age?
To help prevent gas from eating legumes (beans and peanuts) and cruciferous vegetables (broccoli, cabbage, cauliflower, brussel sprouts), over-the-counter Beano may help.
To reduce foaming in the stomach or intestinal tract, over-the-counter simethicone products (e.g., Gas-X) may help. This may help with soda and beer.
OK, your initial question implied a need for something to release stomach gas buildup--I thought you meant medications.
If you were concerned about a problem that could actually obstruct stomach gas release, then my thoughts would include GERD (gastroesophageal reflux disease) or an esophageal motility/relaxation problem. Esophageal injury due to GERD acid reflux could prevent eructation (the medical term for burping). Achalasia is a failure of the lower esophageal sphincter muscle to open and allow food passage down/gas passage up. Esophageal stricture (e.g., due to esophageal web or scarring, such as with GERD) and rare esophageal cancer could cause similar symptoms.
A gastroenterologist (digestive system specialist) may be able to help with an upper endoscopy (tube camera visualization) of the esophagus or an esophageal motility study.
Doctor (MD)
In practice since 2000.