Why Do I Rub My Legs Together in Bed: Causes

Rubbing your legs together in bed is usually a self-soothing behavior your body uses to wind down before sleep. Sometimes called “cricketing” (after the insect), it’s remarkably common and typically harmless. But in some cases, the urge to move your legs at night points to something more specific, like restless legs syndrome or a sensory-seeking habit linked to how your brain is wired.

Cricketing: Your Body’s Built-In Sleep Ritual

Many people rub their feet or legs together rhythmically as they settle into bed, and it works a lot like rocking a baby to sleep. The gentle, repetitive motion creates consistent sensory input that helps quiet your nervous system. This is the same basic mechanism behind other bedtime habits like stroking a soft blanket or rubbing your thumb across your fingertips. Your brain interprets the steady rhythm as a signal that you’re safe and can let your guard down.

Children often develop this behavior naturally and carry it into adulthood without ever thinking twice about it. If the rubbing feels pleasant, happens mainly as you’re falling asleep, and stops once you drift off, it almost certainly falls into this category. There’s nothing wrong with it, and trying to force yourself to stop may actually make it harder to fall asleep by removing a cue your body has relied on for years.

How Leg Rubbing Helps You Cool Down

There’s also a temperature angle. Sleep onset is tightly linked to your core body temperature dropping, and that drop happens when blood flow increases to your skin, especially in your hands and feet. Rubbing your legs together generates gentle friction that warms the skin’s surface, which promotes blood flow to those areas and helps your body shed heat from its core. Research published in the American Journal of Physiology found that warming the skin by less than one degree Celsius reduced the time it took to fall asleep by about 26%, or roughly three minutes. That’s a meaningful difference, and your body may have figured this out on its own without any conscious effort from you.

This is also why people instinctively stick one foot out from under the covers or tuck their feet together. Your body is constantly fine-tuning its temperature to create the right conditions for sleep, and leg rubbing is one tool in that process.

When It Might Be Restless Legs Syndrome

If the rubbing is driven by an uncomfortable, hard-to-describe sensation in your legs, rather than feeling soothing, restless legs syndrome (RLS) could be involved. About 7% of adults worldwide have RLS, with women affected more often than men (roughly 8% versus 6%). The hallmark is an urge to move your legs that you can barely resist, paired with sensations people often describe as crawling, pulling, throbbing, or itching deep inside the leg.

RLS has five defining features that set it apart from ordinary cricketing:

  • A strong, often irresistible urge to move your legs, usually paired with uncomfortable sensations
  • Symptoms start or worsen when you’re resting, particularly when lying down
  • Moving temporarily relieves the discomfort, whether that’s walking, stretching, or rubbing
  • Symptoms are worse at night
  • No other condition fully explains the symptoms

The key distinction is motivation. Cricketing feels nice. RLS feels like something you have to do to escape discomfort. If you’re rubbing your legs because they feel restless, achy, or “wrong” when you lie still, and the sensation eases when you move but comes right back when you stop, that pattern fits RLS.

Low iron stores are one well-established trigger. Ferritin levels below 50 ng/mL can worsen RLS symptoms even when standard blood tests show iron in the “normal” range. A simple blood test can check this, and correcting low iron often reduces symptoms noticeably. Magnesium and vitamin B6 supplementation has also shown promise for easing RLS severity and improving sleep quality when used alongside other approaches.

Periodic Limb Movement Disorder

There’s a related condition worth knowing about: periodic limb movement disorder (PLMD). Unlike RLS, which happens while you’re awake and trying to fall asleep, PLMD involves involuntary leg twitches and jerks that occur during sleep, typically every 20 to 40 seconds. Most people with PLMD aren’t aware of the movements at all. A bed partner might notice your legs kicking or jerking rhythmically throughout the night, or you might just wake up feeling unrested without knowing why.

If your leg rubbing is something you’re aware of while falling asleep, PLMD is less likely the cause. But if a partner reports that your legs move a lot after you’ve fallen asleep, or you consistently wake up with tangled sheets and no memory of moving, it’s worth mentioning to a doctor. PLMD is diagnosed through a sleep study that tracks limb movements overnight.

Stimming and Sensory-Seeking Behavior

For some people, repetitive leg rubbing is a form of stimming, short for self-stimulatory behavior. Stimming is one of the core features of autism, but it also shows up commonly in people with ADHD and in neurotypical people under stress. The National Autistic Society lists rubbing and touching textures among the most common forms of tactile stimming, alongside hair twirling and scratching.

Stimming serves several purposes: it provides enjoyable sensory input, helps regulate emotions, and can express feelings like excitement or distress. In the context of bedtime, it typically functions as a calming mechanism. The repetitive nature creates predictability, which the nervous system interprets as soothing. If you notice you also rub your legs together when you’re anxious, concentrating, or bored during the day, the behavior likely extends beyond sleep and may be part of a broader sensory-seeking pattern.

This doesn’t necessarily mean you’re autistic or have ADHD. Plenty of neurotypical people stim, especially in low-stimulation environments like a dark bedroom. But if you recognize the pattern across many situations and it co-occurs with other traits like difficulty with sensory overload, strong need for routine, or trouble focusing, it could be a piece of a larger picture worth exploring.

How to Tell Which One Applies to You

The simplest way to sort this out is to pay attention to what drives the behavior. Ask yourself whether you’re rubbing your legs because it feels good, because your legs feel uncomfortable and you need relief, or because the repetitive motion helps your brain settle down. Those three motivations map roughly onto cricketing, RLS, and stimming.

If the sensation is pleasant and happens only at bedtime, it’s almost certainly a harmless self-soothing habit. If your legs feel deeply uncomfortable when still and the rubbing is your attempt to manage that discomfort, track whether your symptoms match the five RLS criteria above and consider asking for a ferritin blood test. If the rubbing is one of several repetitive sensory behaviors you rely on throughout the day, it fits the stimming pattern, which is a normal part of how many brains regulate themselves and not something that needs to be “fixed” unless it’s causing you problems.