This is so familiar to me! I went through the same thing when my daughter was four yrs. old. Her preschool teachers were telling me she was "spacing out" at school. Once, she walked right off the end of a balance beam at gymnastics, and one time, she walked right into the garage door. There were times I would be talking to her and she appeared to be ignoring me, then she would "pop out of it.." During her EEG, she was diagnosed with Absent Seizures. It's a form of childhood epilepsy. I know it sounds scary, but most outgrow it during adolescents. My daughter came off the anti-seizure medication a month before she turned eight, and has been seizure free since.
The doctors want your child tired for the test, because he is most likely to have a seizure when tired. Is there someone who can ride to the hospital with you to keep your child awake?
Like you, I was scared wondering what could be wrong with my child. Before the EEG, I spent a lot of time at Epilepsy.com. It helped a lot! By the time my daughter was diagnosed, I actually felt relief because I knew what was going on, and that she would be okay.
Take a deep breath. If I can help with any questions, I'd be glad to!