Our Services
Medical Information
Helpful Resources
Published on: 7/14/2026
Flexing your legs while sleeping is often caused by Restless Legs Syndrome (RLS) or Periodic Limb Movement Disorder (PLMD). Both conditions can trigger an uncontrollable urge to move your legs, involuntary jerking, or muscle tightening during sleep, often leading to discomfort and disrupted rest.
Key causes include:
Because leg movements during sleep can point to several different underlying issues, self-diagnosis can be tricky—and getting to the root cause is the fastest way to better sleep. Take a free, instant, online symptom check to better understand what may be causing your symptoms and confidently plan your next steps.
Reviewed for medical accuracy: 07/14/2026
Not seeing your question? No worries.
Submit your own QuestionFlexing legs during sleep can be linked to conditions such as restless legs syndrome (RLS) or periodic limb movements in sleep (PLMS). These conditions can make a person feel uncomfortable or have an urge to move their legs, especially at night.
Restless Legs Syndrome (RLS): This condition makes people feel like they need to move their legs, often because of uncomfortable sensations. The need to move can be stronger when resting or sleeping, causing leg movements.
Periodic Limb Movements in Sleep (PLMS): This involves repeated leg movements during sleep. It can happen without the person being aware and may disrupt sleep.
Sometimes, medications can also cause or worsen these symptoms. If someone is experiencing these symptoms and it affects their sleep or daily life, you can use this free symptom checker to help identify possible causes before consulting with a healthcare provider for advice and potential treatment options.
(References)
Lugaresi E, Cirignotta F, Coccagna G, & Montagna P. (1986). Nocturnal myoclonus and restless legs syndrome. Advances in neurology, 3946114.
Smith RC. (1985). Relationship of periodic movements in sleep (nocturnal .... Sleep, 3876585.
Page RL 2nd, Ruscin JM, Bainbridge JL, & Brieke AA. (2008). Restless legs syndrome induced by escitalopram. Pharmacotherapy, 18225972.
We would love to help them too.
For First Time Users
We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.
Was this page helpful?
Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.