Jerking limbs upon waking up

So, I've woken up in a start multiple times in the middle of the night (not in one night of course) and I immediately kick. Not always, but sometimes. Like I wake up and the second I do I kick really fast with one leg. Sometimes I jerk my arm really fast, sometimes I panic and feel like I'm about to fall off of something. Is this from a dream, or insomnia or something? It usually takes me awhile to get to sleep. Thanks.