I get that when I'm in bed sometimes. It goes off if I sit up but it can take an hour or two. I probably wouldn't get it if I stopped pigging out on fatty food just before bed, but fatty food is very nice and I hate refraining from pleasure.
It might be wise for you to get medical advice if homespun interventions don't work, if you can afford medical advice.
It happens when a valve doesn't close properly and allows the stomach contents, which are usually acidic, to squirt back up into the oesophagus. Causes include dodgy diet, obesity, some medications (e.g. calcium channel blockers, nitrates, antihistamines, and certain asthma drugs), gastroparesis that's slowing down the emptying of the stomach, connective tissue disorders (whatever they're supposed to be), and stress.