Thanks for Query,
Uncontrolled leg shaking occurs in many conditions.
Is there any frothing comes from your mouth?If yes then the posibility of epilepsy
if not then syncopal attack is the most likely possibility.
You need to consult your doctor he will ask for blood work up with 2D echo with CT scan
& diagnosed it.