June 2, 2022

Do's and Don't When Fighting Insomnia

Written by: Youssef Soliman, MBChB

Sleep is vital to our lives. Although it seems to be a pretty simple thing (since you just close your eyes and then fall asleep), scientists have been trying for years to understand how we sleep. Despite the excellent progression, we still don’t know everything about how our bodies fall asleep.

Nowadays, many people have insomnia. It is okay to be busy and have no time to sleep for some days, but, unfortunately, some people can’t control that, and they just can’t sleep. Insomnia doesn’t only mean that you can’t fall asleep, but the inability to maintain proper sleep length is also considered insomnia.

Insomnia can be transient, which means that it happens due to current situations like stress, pain, menopause, or disease. It can also be chronic, which is commonly seen in the elderly. Genetic factors also play a role. So far, scientists have identified 7 genes that can predispose someone to insomnia [1]. Insomnia can also be due to the consumption of heavy meals before sleep or caffeine-rich drinks like coffee, tea, and cocoa.


Complications of insomnia

Unfortunately, lack of sleep, whether on purpose or not, as in insomnia, has drawbacks. They include:

  • Problems with focusing and cognitive abilities [2]
  • Increased risk of diabetes and insulin resistance [3]
  • Depression and anxiety [4]
  • Impaired immune system [5]




Your guide to better sleep

Following healthy habits and eating some kind of food can help you have a deeper sleep and reduce the frequency of your insomnia. Here is a list of the most researched tricks.

Food rich in magnesium

Food Milligrams per Serving Percent Daily Value
Pumpkin seeds, roasted, 1 ounce 156 37
Chia seeds, 1 ounce 111 26
Almonds, dry roasted, 1 ounce 80 19
Spinach, boiled, ½ cup 78 19
Cashews, dry roasted, 1 ounce 74 18
Peanuts, oil roasted, ¼ cup 63 15
Cereal, shredded wheat, 2 large biscuits 61 15
Soymilk, plain or vanilla, 1 cup 61 15
Black beans, cooked, ½ cup 60 14
Edamame, shelled, cooked, ½ cup 50 12
Peanut butter, smooth, 2 tablespoons 49 12
Potato, baked with skin, 3.5 ounces 43 10
Rice, brown, cooked, ½ cup 42 10
Yogurt, plain, low fat, 8 ounces 42 10
Oatmeal, instant, 1 packet 36 9



Studies found that magnesium deficiency is associated with more risk of insomnia as magnesium plays a role in neuronal firing. Different studies agree that food high in magnesium can lead to better sleep [6].

You may also try magnesium supplementation, but this should be under the supervision of a nutrition expert or your physician. In general, you shouldn’t take more than 350 mg. [8]

Vitamin D

You may consider vitamin D supplementation. Studies found that Vitamin D supplementation improved sleep quality in patients with insomnia. Consider taking it as a supplement or get exposed to the sun for ~15 minutes daily to allow your body to create its vitamin D [12].


Multiple studies agreed that lavender could help insomnia patients improve sleep quality and relieve stress and anxiety. You may take it as a supplement or in any form you like. You should be aware that some studies found that it can cause gynecomastia in men because it has an estrogen-like effect. So, if you are a male and started to note enlargement of your breast or a female and have a family history of breast cancer, it is better to stay away from it [9].



Try to develop good habits

Different habits have been shown to reduce the severity and frequency of insomnia.

The bed is not for working!

Try to make sure that you use the bed only for sleeping. It would help if you didn’t do any mental work like studying or working in bed. With time, this will teach your brain that it is time to sleep once you are in bed.

Go to bed at the same time daily

Having a consistent schedule will help your brain determine when to sleep and when to wake up. If you go to bed, let’s say, at 11:00 PM daily for a few weeks, you will find yourself sleepy every day around this time. This is because your brain now knows that it is time to sleep!

Daily Exercise

Exercise can be helpful, especially during times of stress, and this can decrease your anxiety and depression. Also, studies found that more physical activity/exercise during the day is correlated with better sleep [10].

No light!

Exposure to light before sleep is associated with disruption of the sleep cycle, insomnia, and anxiety. Try to avoid bright lights and smart devices (laptop/phone) at least 1 hour before sleep. This is because the light is found to disrupt melatonin levels [11].

Things to avoid for better sleep

In addition to things to do, there is a list of things you should avoid before sleep.


Although caffeine is generally healthy and has positive effects on our body, like enhancing our mood, caffeine has been shown to block some receptors in your brain that are associated with feeling sleep. These receptors are called adenosine receptors.

No matter how long you have been drinking caffeine, limiting caffeine a few hours before sleep would be best.

Heavy meals

Avoid eating fatty meals like pizzas or cheeseburgers before sleep. These things can lower your sleep quality by making you more likely to wake up during sleep or even make you unable to sleep.

Exercise right away after sleep

Even though we mentioned that exercise could help make you sleep better, it is recommended that you exercise during the day, not right away before sleep. This is because exercise raises your adrenaline levels, which is associated with more sympathetic activity and awareness.


Insomnia is common among older people, and it is associated with adverse effects like depressed mode, anxiety, and immune dysfunction. Different things have been scientifically proven to improve sleep, like magnesium-rich food, lavender, and vitamin D. Moreover, exercise, a consistent sleep schedule, bed only for sleep, and avoiding caffeine, light, and heavy meals can significantly improve your insomnia.



  1. Hammerschlag, A. R., Stringer, S., de Leeuw, C. A., Sniekers, S., Taskesen, E., Watanabe, K., Blanken, T. F., Dekker, K., Te Lindert, B., Wassing, R., Jonsdottir, I., Thorleifsson, G., Stefansson, H., Gislason, T., Berger, K., Schormair, B., Wellmann, J., Winkelmann, J., Stefansson, K., Oexle, K., … Posthuma, D. (2017). Genome-wide association analysis of insomnia complaints identifies risk genes and genetic overlap with psychiatric and metabolic traits. Nature genetics49(11), 1584–1592. https://doi.org/10.1038/ng.3888
  2. Sio, U. N., Monaghan, P., & Ormerod, T. (2013). Sleep on it, but only if it is difficult: effects of sleep on problem solving. Memory & cognition41(2), 159–166. https://doi.org/10.3758/s13421-012-0256-7
  3. Chao, C. Y., Wu, J. S., Yang, Y. C., Shih, C. C., Wang, R. H., Lu, F. H., & Chang, C. J. (2011). Sleep duration is a potential risk factor for newly diagnosed type 2 diabetes mellitus. Metabolism: clinical and experimental60(6), 799–804. https://doi.org/10.1016/j.metabol.2010.07.031
  4. Nutt, D., Wilson, S., & Paterson, L. (2008). Sleep disorders as core symptoms of depression. Dialogues in clinical neuroscience, 10(3), 329–336. https://doi.org/10.31887/DCNS.2008.10.3/dnutt
  5. Besedovsky, L., Lange, T., & Born, J. (2012). Sleep and immune function. PflugersArchiv : European journal of physiology463(1), 121–137. https://doi.org/10.1007/s00424-011-1044-0
  6. Costello, R. B., & Moser-Veillon, P. B. (1992). A review of magnesium intake in the elderly. A cause for concern?. Magnesium research5(1), 61–67.
  7. S. Department of Health and Human Services. (n.d.). Office of Dietary Supplements - Magnesium. NIH Office of Dietary Supplements. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/.
  8. Institute of Medicine (US) Committee to Review Dietary Reference Intakes for Vitamin D and Calcium. (1970, January 01). - dietary reference intakes for calcium and vitamin d - ncbi bookshelf. Retrieved May 08, 2021, from https://www.ncbi.nlm.nih.gov/books/NBK56068/table/summarytables.t8/?report=objectonly
  9. Chemicals in lavender and tea tree oil appear to be hormone disruptors. (n.d.). Retrieved May 08, 2021, from https://www.endocrine.org/news-and-advocacy/news-room/2018/chemicals-in-lavender-and-tea-tree-oil-appear-to-be-hormone-disruptors
  10. Reid, K. J., Baron, K. G., Lu, B., Naylor, E., Wolfe, L., & Zee, P. C. (2010). Aerobic exercise improves self-reported sleep and quality of life in older adults with insomnia. Sleep medicine11(9), 934–940. https://doi.org/10.1016/j.sleep.2010.04.014
  11. Bedrosian, T. A., & Nelson, R. J. (2017). Timing of light exposure affects mood and brain circuits. Translational psychiatry7(1), e1017. https://doi.org/10.1038/tp.2016.262
  12. Majid, M. S., Ahmad, H. S., Bizhan, H., Hosein, H., & Mohammad, A. (2018). The effect of vitamin D supplement on the score and quality of sleep in 20-50 year-old people with sleep disorders compared with control group. Nutritional neuroscience21(7), 511–519. https://doi.org/10.1080/1028415X.2017.1317395
Article written by Youssef Soliman, MBChB
Dr. Youssef Soliman has a deep passion for writing. He always loves to explain complex medical topics to laypeople. Youssef has over 1.6 Million views on his Quora account and thousands of followers who love to read his articles. He enjoys digging into the nitty-gritty of the most complex medical topics and come up with simplified, visual explanations for them. He also has interests in nutrition and biochemistry food because he believes that we are what we eat, and many diseases like heart disease are all related to what we eat and our lifestyle. This is why he wants to specialize to become an interventional cardiologist.

Leave a Reply

Your email address will not be published. Required fields are marked *