top of page

How to Get a Great Night’s Sleep for Optimal Health

Nearly everyone has experienced poor sleep at some point in their life. However, when falling asleep too late and waking exhausted every morning, tossing and turning throughout the night, or even consistently sleeping a full eight hours but feeling fatigued all day becomes the norm, then it needs to be addressed.

We recently discussed the ways that sleep and stress are intertwined. We have also covered things that interfere with sleep, such as various lifestyle habits, medications, and physical and mental health conditions. There is one important aspect left to cover - how to actually improve sleep!

How to Get a Great Night’s Sleep for Optimal Health

What Helps Improve Sleep?

If you consider taking a prescription sleep aid, it is important to note thatin 2007, the FDA warned that rare but serious injuries, including sleepwalking, sleep-driving, and death, had happened with certain prescription insomnia medications. The symptoms were most common with Lunesta, Sonata, and Zolpidem. As a result, it required drug manufacturers of sedative-hypnotic drugs to add a boxed warning to the medications (1, 2). There are plenty of other resources to help you gain a better night’s sleep.


Turning off the bedroom lights typically helps us drift to sleep, the dark stimulating the brain to release melatonin. If you're experiencing sleeping problems, taking a melatonin supplement could help. Evidence shows that melatonin supplements not only help reduce the time it takes to fall asleep, they also help regulate the sleep-wake pattern (3). A meta-analysis also found that melatonin supplements show promise in preventing phase-shifts from jet lag and improve insomnia in otherwise healthy adults, but to a limited extent (4). It is important to note that melatonin does need dark to help you sleep.

While melatonin’s sleep benefits are well known, it does have many other benefits. Melatonin also has anti-inflammatory effects, and several studies have found it reduces tissue destruction by regulating the cytokine production of immunocompetent cells (5). The sleep hormone may also be a promising drug for sepsis (2). Several animal models demonstrate that it can prevent multi-organ dysfunction and improve survival, and clinical trials in the pediatric population have also shown promising results (6). Additionally, the minimal side effects of oral melatonin make it a favorable adjunctive treatment in patients with severe sepsis and septic shock (6).


Oral melatonin isn't the only supplement that may improve sleep. Magnesium also plays a role in the sleep process, and additional magnesium in your diet plays a vital role in sleep regulation (7). Low magnesium levels are associated with poor sleep quality, insomnia, anxiety, and depression (7). In one study, elderly patients with insomnia took 500 mg of magnesium daily for eight weeks. The results found that, compared to the placebo group, the group taking magnesium experienced increased sleep efficiency, slept longer, spent less time falling asleep, had increased melatonin levels, and decreased cortisol levels (8).

Health experts recommend adults take 300 to 420 mg of magnesium daily, depending on sex and age (7). Some foods with magnesium include leafy green vegetables, nuts, legumes, seeds, yogurt, milk, tofu, soy products, and whole grains like brown rice (7).

Vitamin D

Not getting enough sunlight and experiencing poor sleep? You may have a vitamin D deficiency, which is sometimes associated with sleep disorders, poor sleep quality, short sleep duration, and sleepiness (2). There is some evidence that vitamin D supplements can improve sleep, and one study found that vitamin D supplements in veterans increased their sleep duration (9). Another clinical trial found that vitamin D supplements improved sleep duration in people with sleep disorders (9). However, more trials are needed to confirm the role of supplements of the sunshine vitamin in the prevention and treatment of sleep disorders (9).

Exercise and sleep

While exercise lowers the risk of cancer and diabetes, moderate-to-vigorous exercise can also improve sleep quality by reducing the time it takes to fall asleep and relieving the need for sleep medications (10). Additionally, regular physical activity reduces the risk of excessive weight gain, reducing the likelihood of experiencing obstructive sleep apnea — which is often associated with obesity.

The National Sleep Foundation's 2003 Sleep in America poll found that 52% of adults ages 55 to 84 exercised less than once a week. These respondents were more likely to sleep less than six hours a night, experience fair or poor sleep quality, struggle with falling or staying asleep and receive a diagnosis of a sleep disorder like insomnia, sleep apnea, or restless leg syndrome (10). A 2013 Sleep in America poll surveyed adults ages 23 to 60 and found that approximately 76-83% of respondents who exercised reported very good or fairly good sleep quality (10). This figure dropped to 56% for those who did not exercise.

According to the Sleep Foundation, the topic of exercise shortly before bed is a contentious one, with some literature stating that it negatively impacts sleep due to its effects on heart rate, body temperature, and adrenaline levels, while others say it may not produce adverse effects (10). One survey found that the majority of people who exercised after 8 pm fell asleep quickly (65%), had a deep sleep (62%), and woke up feeling better (60%). Those who reported exercising earlier in the evening — between 4 pm and 8 pm — had similar results (11). However, 24% of late evening exercisers reported difficulty falling asleep compared to only 7% of early evening exercisers (11).

The Sleep Foundation recommends exercising based on times that suit your sleep schedule, noting that certain exercises, like yoga, light stretching, and breathing exercises, may be more beneficial for sleep than others (10).

Tracking Your Sleep to Find the Underlying Issue

Electronic trackers like a Fitbit, Garmin, or Apple Watch, can be a valuable method of tracking patterns that may be causing poor sleep. A study found the devices had high performance in detecting sleep, and some even had more accurate approximations of self-reported sleep than research-grade devices, offering an affordable alternative for tracking sleep in healthy populations (12).

Sleep diary - Sleep problems aren't always easy to identify, and a sleep diary can be a valuable tool for both patients and doctors to monitor sleeping habits (13). Identifying details and patterns that affect sleep can reveal habits that may explain sleeping problems. Sleep diaries may include details about the following (13):

• Bedtime and/or lights-out time

• Wake-up time

• How long it takes to fall asleep

• The number and duration of sleep interruptions

• The number and duration of daytime naps

• Perceived sleep quality

• Consumption of alcohol, caffeine, and/or tobacco

• Daily medications

• Daily exercise

Creating the Best Sleep Habits

It may be difficult to know where to begin, especially if you’ve struggled with sleep for years. A great tool is the RELACS acronym.

RELACS — Routine, Environment, Let Go, Avoid, Calm the Mind, Supplement —This acronym is a handy way to remember ways to improve sleep hygiene (2).

  • Routine: practice good sleep hygiene, stick to a regular bedtime

  • Environment: dark, quiet space, comfortable mattress and pillow, comfortable temperature

  • Let Go of worries and concerns; writing them down can help

  • Avoid: stimulants, alcohol, electronics, and food 2-3 hours before bed

  • Calm the mind: meditation, read a peaceful book, listen to calming music

  • Supplement: consider taking a sleep aid

You Can Enjoy Restful Nights

As mentioned previously, there are many factors that can interfere with sleep, and diagnosing the cause is the first step to treating the symptoms. Tracking your sleep patterns with a sleep diary, electronic tracker, and talking to your physician is a good place for you to start. Supplements like melatonin, vitamin D, or magnesium, and a regular exercise routine may also help. Additionally, adopting good sleep hygiene habits, like maintaining a regular bedtime and creating a dark, quiet environment for sleep can go a long way in improving sleep quality (2). Once we either rule out or discover if underlying conditions are contributing factors, then we can create a plan to treat the cause. We are also happy to partner with you to help you discover and implement strategies to deal with stress, provide guidance to form better sleep habits, and develop a personalized plan so you can begin looking forward to restful nights.


Jonathan Vellinga, M.D.

Dr. Erik Lundquist is Board Certified in Family Medicine with ABFM and he is sub-specialized with the American Board of Integrative Medicine (ABoIM). He has also has received a certification from the American Board of Integrative and Holistic Medicine (ABIHM).

Dr. Lundquist has a special interest in Integrative and Holistic medicine. He is currently the founder and medical director for the Temecula Center for Integrative Medicine specializing in all aspects of Functional Medicine. ​He is a member of the American Holistic Medical Association as well as the Institute of Functional Medicine. He specializes in endocrine disorders, especially thyroid and adrenal dysfunction, chronic fatigue, migraine headaches, cardiometabolic disorders, and chronic pain.




  1. FDA adds Boxed Warning for risks of serious injuries caused by sleepwalking with certain prescription insomnia medications. U.S. Food & Drug Administration. (2019, April 30). Retrieved from

  2. Lunquist E. Sleep and Stress: What’s the Connection? Metagenics Institute. 2002.

  3. Auld F, Maschauer EL, Morrison I, Skene DJ, Riha RL. Evidence for the efficacy of melatonin in the treatment of primary adult sleep disorders. Sleep Med Rev. 2017 Aug;34:10-22. doi: 10.1016/j.smrv.2016.06.005. Epub 2016 Jul 20. PMID: 28648359.

  4. Costello RB, Lentino CV, Boyd CC, et al. The effectiveness of melatonin for promoting healthy sleep: a rapid evidence assessment of the literature. Nutr J. 2014;13:106. Published 2014 Nov 7. doi:10.1186/1475-2891-13-106

  5. Esposito E, Cuzzocrea S. Antiinflammatory activity of melatonin in central nervous system. Curr Neuropharmacol. 2010;8(3):228-242. doi:10.2174/157015910792246155

  6. Colunga Biancatelli RML, Berrill M, Mohammed YH, Marik PE. Melatonin for the treatment of sepsis: the scientific rationale. J Thorac Dis. 2020;12(Suppl 1):S54-S65. doi:10.21037/jtd.2019.12.85

  7. How Magnesium Can Help You Sleep. Sleep Foundation. (2022, April 8). Retrieved from

  8. Abbasi B, Kimiagar M, Sadeghniiat K, Shirazi MM, Hedayati M, Rashidkhani B. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci. 2012;17(12):1161-1169.

  9. Romano F, Muscogiuri G, Di Benedetto E, Zhukouskaya VV, Barrea L, Savastano S, Colao A, Di Somma C. Vitamin D and Sleep Regulation: Is there a Role for Vitamin D? Curr Pharm Des. 2020;26(21):2492-2496. doi: 10.2174/1381612826666200310145935. PMID: 32156230.

  10. Exercise and Sleep. Sleep Foundation. (2022, May 6). Retrieved from

  11. Youngstedt SD, Kline CE. Epidemiology of exercise and sleep. Sleep Biol Rhythms. 2006;4(3):215-221. doi:10.1111/j.1479-8425.2006.00235.x

  12. Lee JM, Byun W, Keill A, Dinkel D, Seo Y. Comparison of Wearable Trackers' Ability to Estimate Sleep. Int J Environ Res Public Health. 2018;15(6):1265. Published 2018 Jun 15. doi:10.3390/ijerph15061265

  13. Sleep Diary. Sleep Foundation. (2022, April 12). Retrieved from


bottom of page