how do I stop doing this?
actually kicking in bed (I assume you kick of your blankets) are perfectly normal in children and young adults. You'll eventually grow out of it. You could ask your doctor if there are any treatments if it is really bothering you.
It sounds like you have wrestless leg syndrome? If so, you need to exercise regularly. If that doesn't work (or you don't care enough of about your health to do it), there are meds that can help. Talk to your doctor.
Tie yourself down. Simple.