On Diet...
If you suspect you're not getting enough calories or the right kinds of calories, you can alter your diet and play with it until you find something that works.
Simple carbohydrates digest and absorb into your body very quickly. They can give you a quick but temporary boost in your energy levels. The problem is that simple carbs can leave you out of energy (a phenomenon known as "gassing") after that short period of time has completed.
Therefore, to avoid gassing, you want to fill your diet with complex carbohydrates, "good" fats (unsaturated fats), and protein. Those digest a lot more slowly than simple carbohydrates do and provide a more steady, longer lasting energy level.
The other thing you can look into is not just shifting away from simple carbs, but also how many calories you're taking in. You might not be getting enough. Getting too few calories can lower your metabolism and shift your body into a fat burning state (stored fat, not dietary fat). In that state, you will feel fatigued. It's also known as "hitting the wall".
By the way, you might think you're eating the right amount of calories if you're not gaining or losing weight. That's not necessarily correct. Sometimes raising the number of calories you eat can actually raise your body's metabolism at the same time.
But that can cause you to gain weight until your body gets out of the low-metabolism stage and raises its metabolic rate higher. You can avoid gaining weight by increasing your exercise output. In fact, your body will feel more energetic, so it will naturally cause you to work harder, thus burning more calories and therefore not gaining any weight.
The result is that you shift from low calories in and low calories out, to higher calories in and higher calories out.
When you find yourself hitting the wall, what sports coaches tell you to do is to quickly drink a sport's drink (Gatorade or anything with simple carbs, especially glucose). That will very quickly give you energy. But the problem, again, is that this will only give you a short-term boost of energy and will drop very quickly again. So you end up having to drink sports drinks continuously in this case. It's something you can try, but it's better used only for competition rather than training for form, in my opinion. (I'll explain why in the next section.)
Another thing that many athletes do is to split up their meals from 3 big meals a day to 5 or 6 smaller meals a day. This can give you a more consistent amount of energy, and avoids the "bloated" feeling that a large meal might give you.
Eating at least an hour before working out should help also. Meals take time to digest, so you might have to play with the timing until you feel good about it.
Alright, so that's all I'm going to say on diet. Obviously, there's a lot there to play with. You're going to have to see what works for you.
Practice Makes Permanent. Perfect Practice Makes Perfect...
Another aspect you should look at is how you're training. In martial arts, we're often just told to keep repeating stuff. And with kata, it's very easy to repeat and repeat ad nauseam.
The problem with that way of training is that it just emphasizes repetition. It's suggested that if you just repeat something over and over, you'll be a master at it years from now.
Instead, you should look at what high level athletes do. The best athletes put emphasis on quality of practice and the overall result they're trying to achieve, rather than simply on repetition.
What that means in practical terms is that you still need to repeat things to get better at it, but don't continue repeating it if you can't get better each time you do it.
If you find yourself tiring, that punch may not be as strong, the punch might not be on target or timed well enough, your upper and lower body may not be in sync, that stance may not be as long or deep, your attention may not be as focused, etc. You know when this happens. You can feel it. At that point, move on to something else! Stop repeating it at that moment.
Why? Because if you keep repeating something with sloppy form, you are training sloppy form into your muscle memory. When form is the primary thing being trained, you must always try to improve your form or at least never let it get worse. If you can't do it, if your form is getting worse as you train, then you must stop. Otherwise you are drilling poor form into your muscle memory, and that will keep you from attaining your goal.
Yeah, sorry that you can't repeat that form 100 times today. I know you keep track of how many times you repeated it, and you try to outdo yourself each day. But that was the wrong way to go about it. You may never reach 100 repetitions a day ever again if you practice the way you should. Maybe you can do it only 10 times reliably well before it begins to worsen. That's okay.
When you reach your limit for the day for practicing correct form, you should then work on everything else. That would be stuff like raw power and strength, flexibility, speed, etc.
That tells you how to structure your workouts. You always want to do a warm-up at first, of course, but it shouldn't destroy your muscles. Then right after that, do your form training stuff. After that, place all of the rest of your workout. That would be stuff like push-ups, sit-ups, pull-ups, weights, bag work, running, sparring, etc. It's okay for that other stuff to be last, since it's designed to push your body to the limits, well beyond the point at which you start to lose accuracy in your form.
In other words, prioritize your form over all else. If you destroy your muscles prior to working on form, your form will just suck. So you need to put form work first.
RECOVERY...
Lastly, I want to talk about recovery. Recovery is what your body has to do after a workout to heal itself and refuel. It takes time for recovery to complete. If you workout again before you have fully recovered, your performance may suffer.
The muscles themselves have a kind of fuel storage system in them called muscle glycogen. That's the first thing to be used up during a workout. Your muscles will use up their glycogen reserves, so the body has to work hard to continuously refuel the muscles, and it pulls that fuel from the food you just digested or from stored fat cells.
After a workout, the body has a small (2 hour-ish) window of time whereby it's able to refuel muscle glycogen much more quickly. That's the time when you can actually benefit from taking sports drinks or anything with simple carbohydrate that can be digested and absorbed more quickly.
After that window of time after a workout, your body stores muscle glycogen at the usual rate, not the increased rate. If you miss that window of time, you might not recover as quickly.
Top athletes can recover within 24 hours after a workout, so they can train every day. Whereas, normal people usually require 48 hours to recover. The only way a regular, semi-athletic person can do it in 24 hours is to use that small window of time after a workout to refuel.
And by the way, the older you get, the more likely it will be that you absolutely need 48 hours to recover. This is even if you take advantage of the 2 hour window of opportunity after a workout to refuel. And sometimes it may take a week to recover if you really overdo your workout and destroy your body. (So don't do that!)
Which brings me to another point. If you're trashing your body in every workout, you will hinder your long-term improvement. This seems non-intuitive. Working hard so that your body is completely worn out each time is usually something traditional arts tell you to do. But they're wrong. If you do that, you can't come back tomorrow. You won't be recovered by then. It may even take you a week or more to recover from those workouts. And you probably know what I'm talking about, because you experience it often enough. That has to stop.
You have to practice with your goals in mind, and if your way of training isn't getting you closer to those goals, it has to be changed. Non-intuitively, that may mean you have to go easier on yourself instead of trying harder and harder.
Obviously this pays off in a major way for you. If you can train every day instead of every other day, you can get better at twice the rate. Recovery gives you the biggest bang for the buck in this equation, if you're doing the math correctly. So the importance of recovery can not be overstated.
In Conclusion / TL;DR...
Now putting it all together, how does energy and the way you train relate to each other? The answer is now simple: 1) Eat the right kinds of foods (no simple carbs) at the right times to keep your energy level consistent. 2) Place your form practice first in your workout, right after warm-ups. 3) Repeat your form, but stop the moment you see your form worsen in the previous repetition. 4) Improve your recovery time so that you can come back every day instead of every other day.
If you do it that way, your energy won't be the thing keeping you back.
Hope that helps!