Speaking from knowledge (not experience):
That's definitely your survival mechanism kicking in to keep you going.
First, your body will begin taking fat and burning it out of the adipose tissue to provide energy. It won't burn 100% of your stored fat, because this would be too dangerous.
At the same time, it will begin releasing Glucagon, which is a hormone that signals the liver to release glycogen and undergo glycogenolysis.
Glucagon is the reverse of insulin; it's aimed at increasing blood sugar.
Glycogen is split in the liver to release glucose, which is then also released into your bloodstream.
Once you get low on glucose and fat, this is where it begins to get dangerous.
Your muscles begin to stop using glucose to power themselves and switch to already-built-up lactic acid crystals, a less efficient energy method. Your brain, which uses huge amounts of glucose, will begin to shut down, until it begins to also use lactic acid as energy sources. (This was just recently discovered.)
At this stage, your brain will be functioning very suboptimally; you'll be roughly at the level of a person who is extremely drunk.
Loud Whispers is right : sleep deprivation ramps up your metabolism very, very high. Among other functions, sleep is used as a downtime to burn energy sources and digest new nutrients; without it, your body works on existing stored energy to keep it functioning at the same level.
The human body is an impressive machine with a lot of mechanisms for lack of sleep, food, and even water to a certain extent.
Our ability to survive on very little subsistance if we need to is one of our greatest assets as a species as well as our ability to eat just about anything.
What kept you going is that the human body stores nutriance and energy for later use. So even though you had not eaten for five days your body still had some food left over so to speak. Your high energy I don't know exactly about but it makes perfect sense if you think of it on an animal level, you havn't eaten and your only way to get more food is to have the energy to do so, it is likely that the body forgos certain receptors to allow the gathering of food.
In fact Insomnia is often a case of a survival mechanism gone wrong.
The first 24 hours or so would be your body continuing to digest food already in your stomach and intestines. The rest, it's working off existing stores. Fat will last the longest, but it runs out quickly.
By not sleeping and not eating, you compound your energy use; your metabolism elevates to keep you functioning while sleep deprived, and your body will hence be burning your stored and stomach-stored energy much faster than normal.
While you're young, it's safe; but I would not do it unless absolutely necessary, and the only time I'd deem it necessary is in a time of extreme stress (fighting for your life, eg.)