Short sleep raises the hormone that drives hunger and lowers the one that signals fullness. That's why a five-hour night reliably produces a day of grazing, stronger cravings for fast carbs, and much less patience for cooking. You didn't lose willpower; you lost sleep.
Poor sleep also lowers training quality, blunts recovery, and makes it harder to hold onto muscle while losing fat. On any given week, sleep affects your results more than swapping one food for another.
Food influences sleep in both directions. Caffeine after early afternoon, alcohol in the evening, and going to bed genuinely hungry all fragment it. A small protein-and-carb snack an hour before bed helps some people sleep straight through — cottage cheese and fruit, or yogurt.
On a rough-sleep day, don't try to out-discipline the biology. Get your protein in, keep meals to your slots, walk, and let tomorrow be the better day.