Yes, but be careful you don’t overdo it the first few times. While unlikely, there are some people who feel lightheaded/sick.
Another good option if it fits with your schedule, is to eat 3-4 hours before bed and go for a walk right after dinner. Your body should be starting the digestion process by bedtime and the timing matches your circadian rhythm.