Beano might work, but the digestive enzymes in it are largely those that work if beans are your problem. There are more multi-spectrum digestive enzymes that target a wider range of possible problems. But it does seem you have a dietary problem that experimentation with what you're eating, how much you chew your food, how quickly you eat, how soon before going to bed you eat, and the like should resolve.
Try OTC Beano which is pretty cheap considering how many problems it would solve for you.