Can air for a long time in the digestive tract and stomach cause serious pain?

Yes. Air build up in the colon or stomach (often due to fermented foods) may expand the walls and cause pain.