Why Can't I Stay Asleep?

Medically Reviewed by Brunilda Nazario, MD on June 21, 2021

Waking up in the middle of the night can leave you feeling tired the next day. When it happens over and over again, it’s a sign of insomnia, a sleep disorder that makes it hard to fall or stay asleep. But insomnia may not be the only reason why you wake up at night.

Sleep and Pain

When you’re in pain, it’s hard to fall and stay asleep. A poor night’s sleep can also make you more sensitive to pain. To manage pain:

  • Take a warm bath, try deep breathing, or listen to music.
  • Put pillows under your legs, hips, and knees to ease pain.
  • Use a heating pad to relax stiff joints, but avoid heat if you have a serious injury.

Sleep Apnea

With this sleep disorder, your breathing starts and stops over and over. Each time, you briefly wake up to reopen your airway, a cycle that can happen hundreds of times of a night. For mild sleep apnea, your doctor may suggest that you:

  • Lose weight
  • Stop smoking
  • Treat any nasal allergies

Sleep and Bladder Problems

Trips to the bathroom at night to pee (called nocturia) disrupt your sleep and can make it hard to get back to sleep. A urinary tract infection (UTI), enlarged prostate, diabetes, or simply drinking too much liquid can all cause your body to make too much pee or lower the amount your bladder can hold. See a doctor for serious health issues. You can also:

  • Drink less liquid before bed.
  • Avoid alcohol and caffeine, especially in the afternoon and evening.
  • Raise your legs before bed to ease the buildup of fluid, which can cause nighttime bathroom trips.

Sleep and Stress

Stress wakes you up at night, and then you worry about getting back to sleep, which makes the problem even worse. Try these tips for a less stressed night:

  • Get rid of clocks in your bedroom or at least turn them around so you can’t see the time.
  • Try mindfulness, which allows your brain to let go of thoughts and focus on the present so you can relax.
  • Write down what’s makes you feel stressed. Come back to it in the morning.

Sleep Environment

To create a better sleep setting:

  • Make sure your room is as cool, dark, and quiet as possible.
  • Only use your bedroom for sleep and sex.
  • Turn off your TV, smartphone, and computer. The blue light from these devices delays the release of the hormone that helps you fall asleep (melatonin).

Sleep and Restless Legs Syndrome (RLS)

One symptom of this sleep disorder, which causes a strong urge to move your legs or other parts of your body, is trouble staying asleep. Here are some tips to ease your RLS:

  • Walk
  • Massage your legs
  • Do knee bends
  • Take a hot bath
  • Rotate a heating pad and an ice pack

Sleep and Diet

What you eat and drink, how much, and when can impact your rest. Before you go to bed, avoid:

  • Large meals 2-3 hours before bedtime
  • Foods with a lot of fat or sugar
  • Alcohol
  • Caffeine

Researchers are still studying the link between food and sleep. But they’ve found some evidence that certain foods with melatonin or tryptophan (an amino acid) can make you sleepy or promote better sleep:

  • Tomatoes
  • Olives
  • Rice
  • Walnuts
  • Some types of grapes
  • Kiwi
  • Tart cherry juice
  • Fatty fish
  • Milk


Sleep and Narcolepsy

Narcolepsy is another condition that can interrupt your sleep. People with this sleep disorder feel very sleepy at times during the day and may wake up often at night. Some people also have cataplexy, or sudden attacks of muscle weakness.   

Your doctor can prescribe medications to treat the symptoms of narcolepsy. Sometimes, lifestyle changes can help, too. They include:

  • Naps during the day
  • A consistent sleep schedule
  • Regular exercise


Sleep and Nicotine

One habit to break for better sleep is the use of nicotine. You may think a cigarette relaxes you, but like caffeine, nicotine is a stimulant. Other sleep-related side effects include:

  • It raises your heart rate and makes you more alert.
  • It’s addictive. After just a couple of hours without nicotine, you may find you need more, even in the middle of the night when you’re trying to sleep.
  • It raises your chances of sleep apnea and snoring.

Sleep and Exercise

Exercise can help you sleep at night, but avoid it 2-3 hours before bed. Exercise too close to bedtime raises your heart rate and body temperature, which can keep you awake.


If you have trouble staying asleep at night, it may be best to steer clear of naps. If you find that you really need one:

  • Only sleep for 10-20 minutes, or you’ll be even more groggy when you wake up
  • Rest early in the day

Sleep and Medications

Medicines that have caffeine or alcohol and ones that treat certain health conditions can keep you up at night including those that treat:

  • High blood pressure
  • Heart rhythm problems
  • Inflammation
  • Asthma
  • Cold
  • Flu
  • Allergies
  • Thyroid conditions

Talk to your doctor if your medications affect your sleep.


This common sleep disorder may be the reason why you can’t stay asleep. Your doctor may suggest lifestyle changes and will treat other medical conditions that affect your sleep. If this doesn’t work, talk to your doctor about:

  • Cognitive behavioral therapy for insomnia
  • Prescription medication
  • Over-the-counter sleep aids

Show Sources


CDC: “Getting Enough Sleep?”

National Sleep Foundation: “Napping,” “How Blue Light Affects Kids’ Sleep,” “Nocturia or Frequent Urination at Night,” “Lack of Sleep is Affecting Americans, Finds the National Sleep Foundation.”

American Sleep Association: “Smoking and Sleep.”

Harvard Health Publishing: “Medications that can affect sleep.”

PainHEALTH: “Sleep and Pain.”

Sleep Health Foundation: “Anxiety and Sleep,” “Pain and Sleep,” “Restless Legs Syndrome.”

Cleveland Clinic: “Restless Legs Syndrome.”

Arthritis Foundation: “Heat Therapy Helps Relax Stiff Joints.”

Mayo Clinic: “Insomnia,” “Sleep Apnea.”

Narcolepsy Network: “Practice Good Sleep Hygiene.”

Food & Nutrition Research: “Dietary factors and fluctuating levels of melatonin.”

Advances in Nutrition: “Effects of Diet on Sleep Quality.”

National Organization for Rare Disorders: "Narcolepsy."

© 2021 WebMD, LLC. All rights reserved. View privacy policy and trust info