Its very common to have panic attacks in bed, falling asleep, asleep or awake. I used to have them almost continually. I called them "rolling panic attacks." I still have them, sometimes, due to hormone fluctuations (hot flashes), when I'm waking up in the morning. It can have to do with your hormone levels (guys, too!), with unconscious thoughts and stresses, vivid dreams, and some people even have them due to the relaxation, if they're not used to feeling relaxed!