What leads to a rhythmic movement disorder?

Many. Many causes like parkinsonism, some essential tremors etc. Diagnosis is mostly by clinical examination.
Electric dysfunction. Electric dysfunction in the brain parts controlling alternating movements, such as the midbrain and pons. Why and exactly how the cellular circuits involved misfire is anyone's guess. Eeg will help to rule out seizure activity.