It's a widespread belief that eating before bed leads to weight gain, but the evidence supporting this claim is shaky.
Several studies have indeed observed a link between eating before bed and weight gain.
But this association is primarily due to the consumption of extra calories from additional food intake late at night rather than the body being more prone to weight gain during nighttime hours.