There's foods that trigger GERD for me, and I used to roll around the floor every night in agony, not knowing quite what was going on, as it was my norm.
To fix late night issues, I just have to eat before 6pm.
Chew properly. Soups kill me. And anything tomato sauced based is out.
Also weirdly oatmeal can trigger issues for me. But I can get away with it in the morning. I think it's also a chewing issue.
A huge amount of digestion happens in the mouth. So now I get my partner to pre-chew most of my foods for me.