H2s treat heartburn by blocking one of the signals that tell your body to produce acid. However, if you use H2s for more than a few days in a row, they can become less effective at treating heartburn. PPIs (proton pump inhibitors), like Nexium 24HR, treat frequent heartburn by blocking the production of acid. PPIs may take 1-4 days for full effect, but relief lasts for 24 hours.