While bloating is uncomfortable ... It often feels like sharp pain in the upper right abdomen that occurs within 30 minutes of eating and can last for a couple of hours, Mallam says.