Exactly. Eating an early dinner is a huge advantage for a healthy sleep.
When I was younger I'd eat ice cream before bed. People were always dismayed, certain that it would give me nightmares. But that never happened. I just started gaining weight and no longer keep ice cream in the house.