Eating beans regularly and rinsing soaked and cooked beans lower gas production.
Don't boil beans for more than a few minutes. Simmer them instead. Boiling beans for too long will make them too mushy.