I know exactly what you mean - its not pleasant! Basically, when you are asleep your body goes into a paralysis so that you don't physically act out your dreams and get hurt. Sometimes your brain can wake up before the paralysis stops - It sometimes happens to me and the best thing to do is just relax. Remember that it is a natural phenomena and maybe let yourslef drift back into sleep again to wake up slowly. Just don't panic because that can make it fairly traumatic. There is a medical term for this but I can't remember what it is (sorry!) and know that some people can get it very badly while others will only experience it every so often. If you know in your head that it isn't something to worry about it might make it less scary when it happens. I hope this helps a little bit and if I remember the name of the condition I'll let you know!