Your body has to work pretty hard to digest food at any point. Sleep is supposed to be a time of rest, so imagine going to sleep and really -- not sleeping.
No wonder we wake up groggy and have weird dreams through the night.
Here's some things that have happened to me:
The best thing if you have to eat late, is to sit up after eating for a few hours if possible. Ate light? Then you only need to do this for an hour or less. Heavy dinner? Be prepared to stay upright for at least a few hours.