I've actually self injured in my sleep. That's kinda scary. The answer for you seems to be finding a way to avoid panic attacks in general. Have you talked to your doctor about it? Some meds may be right for you.
There are other ways to try to stop them. This site may help you. :)
http://incestabuse.about.com/cs/healing/a/panicattack.htm
Ignore the incest/abuse stuff. It has some breathing techniques and relaxation stuff.
-------
kid, I wrote back,
all lovers betray.