It depends. The most basic advice is to try and eat 45 minutes to an hour before training...not so much for cramps, but to assure plenty of fuel and avoid being sick. Needless to say, our intermittent fasting discussion changes this a bit, so it basically becomes a matter of finding what works best for you. Start with the 45 minutes before idea and see how you feel.