You have probably heard that yoga is ideally practiced on an 'empty stomach.' Anyone who has accidentally tried to do a vigorous yoga class after a big lunch can relate to the truth in that! But that is more or less where the advice begins to diverge.
When considering this question, remember above all that in the yogic worldview, everyone is different. While yoga teachers often try to give simple and straightforward answers, because we think that is what people are looking for, the truth is that every individual has a unique Ayurvedic constitution, meaning that there are no 'hard and fast rules.' Rather, think of these as guidelines that you then need to explore to see which is the most appropriate for you.
There are so many variables here (ayurvedic type, climate, season, diet, lifestyle, what else is going on in your life…) that I think the 'ideal' answer requires a solution that is tailored to your unique needs. One way to think about it is to keep a journal detailing what you ate before practice, when you ate it, and how you felt. Over time that may help you to hit upon the right solution for YOU.
Remember also that your needs are going to change throughout your life, depending on what else is going on - so just when you think you've got it figured out, you may have to change it up again!
If you practice in the morning:
Many schools of thought teach that yoga should be done first thing in the morning, before you eat or drink anything (other than room temperature water). Some people find this pretty comfortable, but I know others who feel light-headed or even faint if they so much as attempt a sun salutation on a completely empty stomach.
If you wake up hungry (which in ayurvedic terms is a good thing!), if the length and intensity of your practice requires a bit of fuel, or if you struggle with low blood sugar in the mornings, try the following:
Have a glass of room-temperature or warm milk 15-30 minutes before practice. Milk temporarily buffers stomach acid, so it can be good to tide you through your practice. However, once the milk is digested your stomach will produce even more acid, so if you are in the habit of drinking milk, make sure you eat a nice alkaline breakfast after your yoga.
Have a (small) cup of milky coffee or tea 15-30 minutes before practice. Yoga guru BKS Iyengar began all of his days like this, and, well, he's going on 96 so it must work for him! Coffee also helps to empty your bowels which is another (less often quoted in a public yoga class!) recommendation for before you start practicing asana or pranayama.
Have a small piece of fruit about 15 to 30 minutes before practice. It should be something light, like a peach or an orange, not a banana, and if possible, something fresh, not tinned. I prefer solid fruit to fruit juice because with solid fruit you get fibre as well as just liquid and sugar, but then, that's just me!
You don't have to wait too long after practice, even an intense practice, to head straight to a nice big breakfast. Wait about 15 or 20 minutes (just time for a shower and to get dressed) and then tuck in!