I wouldn't be worried, unless this happened often. It was most likely a dream of some sort. The body can have signs of panic, (i.E poundign heart) in situations that don't really need it. It's the whole "fight-or-flight" thing. It's really a mechanism for if you you're confronted by some dangerous animal. Humans, being intelectual lifeforms, have that same response to things which offer no potential harm, just psychological stress (like giving a big speech on something; you're not going to die, it's just well, a speech to a large number of people). Now, your dreams basically are your brain on screensaver. The part of sleep that you dream in (known as rem sleep, for rapid eye movement) has the same type of brain waves as that of when you're awake. So, your brain probably triggered panic or something. Your heart beat thing is probably just like when you wake up covered in sweat (sometimes that is because it is hot, others because you just panic and sweat in yoursleep) or even like crying in your sleep. Next time it happens, see if you can remember anything from when you were asleep.