Ive had that happen before, actually a lot, at first my cousin was in the bed with me when it happened she said it looked like I was having a seizure, it happened like 3 times in one night, when I went to the hospital they called it a
night terror. Since its happened a few times, so my doctor ordered a
sleep study which is very expensive, but you should check your medication to see if any side effect is to have siezures.