Thankfully, the solution is simple: if you can help it, avoid eating for two to three hours before bed.
Max Lugavere