Constipation and gas pain
You normally feel gassy when you swallow air when eating or drinking, and when the bacteria in your colon starts feeding on undigested carbohydrates in your stool.
The process of fermentation of undigested food makes gas, such as hydrogen, carbon dioxide, and methane.
The gas from your upper digestive tract is expelled through the esophagus (belching), while the gas from your lower digestive tract is passed through the rectum (flatulence).
However, when you’re constipated, it may become difficult for gas to pass the rectum since the stool is blocking the passage.
When stool stays longer in the colon, the bacteria will continue with the fermentation process, making you feel gassier.
Once the gas trapped in the colon builds up, it will begin to cause bloating, discomfort, and pain.
Other causes of gas and gas pain
Aside from swallowing air, the bacteria in your colon, and constipation with painful gas, here are other possible reasons for painful gas.