Consuming food items in the late evening usually would entail snack foods, which of course generally contain an abundance of saturated fat and calories. Although there is some medical evidence to suggest that sleep deprivation can result in the increased uptake of glucose to fat, there is little to no good evidence to support the notion that eating in the late hours of the day accentuates the storage of fatty tissue.
After eating, the pancreas releases a hormone called insulin. Insulin then signals muscle and fat cells to absorb glucose from food. Sleep deprivation can affect the metabolic functions responsible for storing carbohydrates and regulating hormones. This is a likely candidate for where this persistent medical myth originated.