That's more bro-science than anything. Quality of food/calorie consumption is more important than timing. If anything, if you tend to have late night snacks that are unhealthy, then yeah, cutting it out will be beneficial but that's not attributed to when you ate it, rather what you ate.