This is a sign of stress not necessarily stomach issues. At the very least he is too cold. Bettas need to be kept at a constant temp between 76-82 ideally in the 78-79 range. 2g is large enough for a heater. I use Marineland Visitherm 25w in something that small but there are probably others as well. Also need to invest in a cheap submersible glass thermometer. Tank temp will be several degrees below room temp so if your room temp is 72 your betta is freezing.
What conditioner are you using for the water? And a 2g should be changed several times a week. I'd do maybe two 50%s a week and one 100%. At the very least change 100% every 3-4 days but there will be at least small traces of ammonia present at that point