Don't worry too much about eating right before bedtime - there's quite a bit of
research out there that debunks that. More likely if you wait till dinner you overdo it - so if you have a sensible balanced dinner you're not going to gain weight all because you ate it before you sleep. Remember you are burning calories while you sleep (especially if you have a lot of muscle) - your dinner shouldn't be 2000 calories anyway.