To expand on Brian’s answer the official ACSM Guidelines are
Full meal >3 hours before exercises
3g/kg carbs 3 hours before exercise
2g/kg carbs before exercise
1g/kg carbs 1hour before exercise
(g/kg refers to athletes body weight bw in lbs/2.2 =bw in kg)
As the time shortens 3hrs–>1hr foods should go from more solid or harder to digest items (nuts, fats, fiber, etc) to more liquid based foods that are more easily digested such as yogurt or a banana.
I would also experiment and see what works for you and what doesn’t these are just general guidelines but what works varies person to person.
Hope this information helps!
I have a slightly different answer as the others. Since you don’t state that you’ll be eating a meal, having a light snack consisting of a carb and protein an hour prior to working out will help to fuel a more intensive workout. Especially if working out in the morning, having something light to eat prior to a workout is a must as you’ve been fasting while sleeping.
However if you’ve just eaten a large meal, 2-3 hours is the ideal to aid in digestion.