Generally, episodes of acid reflux and heartburn tend to last a few hours. However, this depends on the underlying cause. Similarly, bloating and gas should go away in a few hours. If they do not, see your doctor.