If your dog is asleep while she's shaking, it's likely that she's just dreaming (chasing rabbits or squirrels, running with other dogs in her dream). If she shakes while she is awake, it could certainly be signs of a physical or neurological problem. Please answer Tony's questions, okay?
Impossible to comment given the brevity of your question. Can you tell us how old your dog is? What type of dog she is? Whether she is asleep when her legs shake? How long she lies down for? Whether your intervention, by calling her etc., means she gets up and becomes more active? Whether you have noticed any trembling of her legs or other body parts while she is standing or sitting? Tony