Side effect of SSRIs can be kicking during your sleep...np.
Involuntary lower leg spasms can also be a post traumatic response, but it's usually while you're awake.
Check with your GP maybe.
Myself, I'm naturally a poor sleeper, but if I take steps I can get round things. Is your room a bit chilly? If my duvet comes off a bit and the room is chilly, I'll probably move around a bit.
It may be that you're having bad dreams? If I'm nodding off and have a microdream where I need to jump or suchlike, I'll kick my legs out.
Hope you sort it out, no sleep is no fun.