lack of sleep is only one of the contributing factors.
i used to experience panic attacks too. made me miss a prelim
paper. :X actually now I still don't really know what's the correct
way to tackle it, except to be alot more prepared for tests and
exams (instead of doing so only at the last minute). Sufficient
sleep is important, and must be good quality sleep. Eat well also.
And hmm... during panic attacks, have to try to calm yourself down
by e.g. take a deep breath and hold it there, count to four (or
ten), breathe out completely.
some people say drinking something warm helps to soothe the nerves,
but for me I find that drinking something icy cold and splashing my
face with ice water or taking a cold bath helps.
and the rest umm... the usual stress-relief techniques loh.
during the onset of stress, TALK TO SOMEBODY!! the more you keep it
to yourself, the worse your panic attack will get. Talking to
somebody about the stress is a form of release.
ahh eating well and sleeping well are the two basic things that you
need to do. It's alright to indulge yourself in comfort food... IF
they make you feel better. Otherwise, eating more fruits that have
bite (i.e. crunchy!) can also help to alleviate stress and improve
the way you feel internally.