Exercise uses up your energy reserves.
Hence, your body needs to replace energy after exercise – stored in the body in the form of glycogen – and this is replaced by carbohydrates (fruit, energy bars, sports drinks) – within 2 hours of endurance exercise.
If you miss the 2 hour window, then your body will be upto 50% less effective at replacing the energy.
You just have to eat the good stuff – not the rubbish.