What can I do to avoid waking up with acid reflux?

Bed trick. Many people find that elevating the head of the bed on cinder blocks is hugely effective. If you wake up with acid reflux, it's not just uncomfortable; you may be aspirating acid into your lungs without knowing it, and that's dangerous. Good luck.
Lifestyle , Rx. Avoid meals near bedtime. If no change try a 4-8 week trial of otc omeprazole.