Let me blow the lid right off of this question. Current wisdom says no, do not eat right before bed as your metabolism slows and the food does not digest at the same rate as when you are active. It is not strictly calories in/calories out.
There is a new trend among the younger generations to have dinner earlier and even go a step farther with intermittent fasting. So dinner at 4:30PM is enjoying a new popularity and we lovers of restaurant’s early bird specials are gaining respect! We are no longer pathetic old geezers but trend-setting health influencers.
What about eating in bed? A topic for another time.