The duration of bloating varies depending on the underlying cause and the body's response to dietary or environmental changes. In some cases, bloating may go away within a few hours or last for several days or longer, especially if there is an underlying digestive issue. If bloating persists for an extended period or is accompanied by other concerning symptoms, you should seek medical attention.