Free Shipping in the U.S. on Orders Over $45.00 + We Ship Worldwide. We Make Food For Your Gut Microbiome.


Your Cart is Empty

“Hacking” Sleep to Boost Immunity – Adapted from Book “The Immunity Code”

August 10, 2022 5 min read

“Hacking” Sleep to Boost Immunity – Adapted from Book “The Immunity Code”

Sleep is of fundamental importance for all animals, including humans, and disrupted sleep is emerging as one of the major drivers of accelerated aging over time. During sleep, the body and brain undergo repair and restoration, and this housekeeping is essential for the sustained functions of not only our tissues and immune systems, but also our sense of well-being and cognition. Some of the recognized functions of sleep are: 

  • Facilitates learning and memory consolidation [1]
  • Clears metabolic waste products that accumulate in the brain during waking consciousness [1]
  • Promotes immune cell function [1,2]
  • Accelerates wound healing [3]
  • Supports positive mood and sense of well-being [4] 

Sleep Stages 

Sleep is cyclic, with an oscillation between two states: rapid eye movement (REM) sleep, where dreaming occurs, and non-REM sleep. Non-REM sleep is further divided into deep sleep and light sleep. Each sleep cycle is approximately 90 minutes, and can be broken down into five discrete stages: four non-REM and one REM [5]. As sleep cycles progress through the night, REM stages increase in length. 

Deep sleep is the stage of sleep associated with bolstering immune function and tissue repair. On the other hand, the function of REM sleep is poorly understood but is believed to serve a complementary role in supporting learning, memory, and cognition. Moreover, some researchers hypothesize that deficits in REM sleep can drive weight gain, obesity, depression, and immune dysfunction. 

“Hacking” Sleep to Boost Immunity and Your Overall Health 

In his book “The Immunity Code”, author Joel Greene outlines some of the major benefits of sleep, how many people in our society are unconsciously sabotaging their sleep, and how to optimize sleep to improve health and slow down aging. 

One major disrupter of sleep that Joel outlines is fasting. In particular, fasting appears to have negative effects on REM sleep. Thus, despite the great press that fasting has gotten over the past few years, it is not a panacea and can actually cause harm in certain cases. 

STEP 1 Stop Fasting 

There are a series of steps we can take to restore “peak human sleep”, the first of which is to stop routinely fasting, especially before sleep. In fact, carbohydrate consumption in the evening actually promotes melatonin production and release. Thus, adding some carbohydrates into your dinner or having a carb-based snack within an hour or two of bedtime can help to reduce sleep latency (i.e. the time it takes to fall asleep) [6]. 

STEP 2 Mimic Our Ancestors 

The next steps to restoring optimal sleep relate to getting back to our roots and modifying our modern sleep routines to more closely mimic those of our ancestors. The modern sleep environment is characterized by: 

  • Staying up an extended period of time after sunset
  • Waking up after the sunrise
  • Snoring and sleep apnea caused by a narrowing of the airways
  • 24/7 temperature-controlled environments
  • Frequent waking during sleep
  • Long sleep latency
  • Insomnia 

In contrast to the modern sleep environment, the ancestral sleep environment (as observed in the Hadza hunter gatherer tribe) is characterized by going to sleep with the sunset and rising with the sunrise. To this end, the second step is to try out the ancestral sleeping schedule: going to bed around 9pm and waking up around 5am. 

STEP 3 Chewy Secret 

Additionally, the ancestral environment involves broad airways that are established through the regular consumption of hard, chewy foods. The mechanical force generated by the jaw during the chewing of hard foods develops the facial bone structure, which facilitates widening of the upper palate and broadening of the nasal airways. These broad airways prevent apnea, allowing the body to be appropriately oxygenated during the sleeping window. Thus, the third step is to incorporate more hard, chewy foods into your diet to help reshape the face and widen the airways. This can be accomplished with raw vegetables, beef jerky or other dried meats, and chewy cuts of meat like skirt or flank steaks. With the guidance of a skilled holistic orthodontist, dental appliances can also be implemented to encourage widening of the upper palate. 

Inflammation and Sleep

Although acute inflammation serves crucial roles in immune function and tissue repair, chronic low-grade inflammation is at the root of virtually every chronic disease, from obesity and diabetes, to Alzheimer’s and autoimmunity. Research suggests that inflammatory markers, namely C-reactive protein (CRP) and IL-6, are positively associated with sleep disturbances, meaning that an inflamed body engages in lower quality sleep. This poor-quality sleep further exacerbates inflammation and immune dysregulation, driving a feed-forward loop that leads to accelerated aging and breakdown of the body and mind. 

To this end, Joel outlines his “inflammation spin down” which involves: 

  • Implementing the Two Day Core pattern of eating, outlined in Chapter 25 of The Immunity Code as well as in our previous blog post found here
  • The addition of five modules to insert over the course of four days.

The five modules are: 

  1. Evening pre-bed module

Melatonin, vitamin D, rutin, pterostilbene

  1. Inflammation small molecule module

Fisetin, exogenous ketones, niacin, N-acetyl cysteine, vitamin D

  1. Cold induction module

First thing in the morning: cold water immersion OR walk-in refrigerator OR cold shower

  1. High omega food module

Foods choices include: avocado, salmon, walnuts, cheese, eggs, chia seeds, hemp seeds, flax seeds, edamame, tuna, sardines, cod, mackerel, sea bass, macadamia nuts, hazelnuts, pecans, cottage cheese, olive oil, olives, peanut butter, tofu, pumpkin seeds

  1. Feast module

Consume twice the amount of calories you typically eat on Day 1, the “fiber day”, of the Two Day Core Pattern to stimulate growth and repair 

Using this strategy, the four days are outlined as follows: 

Day 1: “fiber day” (Day 1 as outlined by the Two Day Core Pattern) and the evening pre-bed module 

Day 2 and Day 3: inflammation small molecules, cold induction, high omega food module, evening heat, and evening pre-bed module 

Day 4: Feast module 

For individuals who particularly struggle with getting restful sleep, oleamide and GABA can be added to the list of molecules outlined in the “evening pre-bed” module to further promote deep sleep. 

For individuals struggling with sleep latency, soaking the hands and feet in warm water for a few minutes before bed paradoxically helps the body’s core temperature decrease, which is essential for dropping into sleep. 

Finally, be sure to avoid as much bright light exposure post-sunset as possible, and consider turning off your WiFi at night to avoid potential disruption to sleep caused by electromagnetic frequencies (EMFs). 

Incorporating some or all of these strategies will not only improve the quality of your sleep, but will also set you up for optimal health and a decelerated aging process.



Dr. Alexis Cowan, a Princeton-trained PhD specializing in the metabolic physiology of nutritional and exercise interventions.

Follow Dr. Cowan on Instagram: @dralexisjazmyn 


[1] Yamazaki R, Toda H, Libourel PA, Hayashi Y, Vogt KE, Sakurai T. Evolutionary Origin of Distinct NREM and REM Sleep. Front Psychol. 2020 Dec 14;11:567618. doi: 10.3389/fpsyg.2020.567618. PMID: 33381062; PMCID: PMC7767968. 

[2] Besedovsky L, Lange T, Born J. Sleep and immune function. Pflugers Arch. 2012 Jan;463(1):121-37. doi: 10.1007/s00424-011-1044-0. Epub 2011 Nov 10. PMID: 22071480; PMCID: PMC3256323. 

[3] Mostaghimi L, Obermeyer WH, Ballamudi B, Martinez-Gonzalez D, Benca RM. Effects of sleep deprivation on wound healing. J Sleep Res. 2005 Sep;14(3):213-9. doi: 10.1111/j.1365-2869.2005.00455.x. PMID: 16120095. 

[4] Triantafillou S, Saeb S, Lattie EG, Mohr DC, Kording KP. Relationship Between Sleep Quality and Mood: Ecological Momentary Assessment Study. JMIR Ment Health. 2019 Mar 27;6(3):e12613. doi: 10.2196/12613. PMID: 30916663; PMCID: PMC6456824. 

[5] Patel AK, Reddy V, Araujo JF. Physiology, Sleep Stages. [Updated 2022 Apr 28]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2022 Jan-. Available from: 

[6] St-Onge MP, Mikic A, Pietrolungo CE. Effects of Diet on Sleep Quality. Adv Nutr. 2016 Sep 15;7(5):938-49. doi: 10.3945/an.116.012336. PMID: 27633109; PMCID: PMC5015038.

Leave a comment


What to eat on "The 2-Day Core" diet protocol
What to eat on "The 2-Day Core" diet protocol

September 11, 2022 11 min read

Hundreds of people have seen great success by following the "2-Day Core Pattern" diet protocol that is outlined in Joel Greene's 2020 book, The Immunity Code. 

However, the actual menu to follow can be confusing for readers, so we put together this handy guide to explain what you should be eating during the protocol. 

Read More
HMO 2'-FL helps reduce stress
The Human Milk Oligosaccharide, 2’-FL, and its Effects on Stress-Induced Gut Motility

September 05, 2022 7 min read

Stress is a reaction to so many areas of our lives, and as a result, in many cases this leads to a condition called dysmotility. It occurs because of a neurological reaction that causes the muscles or nerves within the digestive tract to become affected to the point of disruption. So, the digestive process no longer works as it should. Dysmotility leads to interruption of the absorption of nutrients and has a direct impact on how you will perform on a social and professional level. Can HMO, 2'-FL, helps with the stress-induced gut dysmotility? Read more to find out. 

Read More
HMO clinical trial with IBS Patients
Can Human Milk Oligosaccharides Improve Symptoms of Irritable Bowel Syndrome (IBS)?

August 24, 2022 7 min read

Can Human Milk Oligosaccharides Support Normal Bowel Function and Improve Symptoms of Irritable Bowel Syndrome? What does the clinical studies say? 

Overall, the study concluded that the ingestion of a 4:1 oral mix of the HMOs, 2’FL and LNnT improved abdominal pain, stool consistency, bloating, and the severity of the condition. Not only did the study demonstrate that HMOs could improve the quality of life of IBS patients, but it was the first large-scale study to show that HMO supplementation can improve IBS symptoms.

Read More