Insomnia and the Gut Microbiome

Feel free to check out my articles about the gut microbiome and synthetic biology if you’re not very familiar with those topics yet. There’s also a video version for this article ;)

We all sleep, don’t we? That wonderful activity that lets us recover energy, store memories and that also feels so good. Well, more than 50 million people in the US alone suffer from sleep disorders.

It’s become kind of a trend to find videos on YouTube that say things like “CEOs only sleep 4 hours” or “I slept for 3 hours a day. These are the results”. Most of these videos aren’t scientifically based. If there’s something to take out of this article is that everybody needs to sleep.

Yet, not everybody can. At least, not in the right way, or enough time. This is when people may need to take melatonin pills, which aren’t always as effective.

What can synthetic biology do about this?

🦶The basics

Sleep helps us repair our bodies, recover energy, perform well the next day, and so on. Lack of sleep has been linked to a higher risk for certain diseases and medical conditions, like type 2 diabetes, high blood pressure, heart disease, stroke, poor mental health, and early death.

Circadian rhythm

Another kinda fancy word. The way I see it, the circadian rhythm is an abstract concept to refer to all the body organizing its schedule to do different activities. Every 24 hours the cycle is repeated. In other words, it’s how we measure the “day” in our bodies.

While the body follows the circadian rhythm, this last one is synchronized with a master clock in the brain. This master clock is found in the hypothalamus, and it is influenced by light, which is why the circadian rhythm is tied to the cycle of day and night.

Other cues, like exercise, social activity, and temperature, can also affect the master clock. However, light is the most powerful influence.

Representation of the circadian rhythm and its relation with sleep

Circadian rhythms exist in other organisms as well, which can help us understand the difference between a circadian rhythm and a body clock. The former, is a 24 hour cycle, while other ones can have different timings. For instance, plants adjust to changing seasons using a biological clock with timing that is distinct from a 24-hour cycle.

In short, the circadian rhythm is a cycle to which the body aligns, and a way to know when to produce which substances. It’s influenced by external factors such as light, which lets the body know when it’s time to sleep.

More cycles

Just to know more, I think it’s also interesting to know about the different stages that we go through when we sleep, and what happens in each one of them.
At first, we can divide the phases into 2: non-rapid eye movement (NREM) sleep, and rapid eye movement (REM) sleep. The first phase is also divided into 3 stages. Let’s take a look into what happens in each of these:

NREM1: light sleep. Your muscles relax and your heart rate, breathing, and eye movements begin to slow down

NREM2: deeper sleep. Your body relaxes more and continues slowing down. This is typically the longest stage.

NREM3: heartbeat, breathing, and brain wave activity their lowest levels. The most important one for you to crush the next day

REM: it starts about 90 minutes after you fall asleep. Your eyes will move back and forth rather quickly under your eyelids. Your breathing and heart rate will begin to increase. This is when you dream.

🎯 The Challenge

Sleep disorders

It’s normally the deregulation of this circadian clock that causes the difficulty to sleep for some people.
According to general estimates, 10–30% of adults live with some form of insomnia, which is defined by a persistent difficulty falling or remaining asleep despite the opportunity and motivation to do so.
Chronic insomnia occurs when these symptoms are present at least three times per week for at least three months. Insomnia lasting less than three months is known as short-term insomnia.

Two main models exist as to the mechanism of insomnia: cognitive and physiological. The cognitive model suggests rumination and hyperarousal contribute to preventing a person from falling asleep and might lead to an episode of insomnia.
The physiological model is based on 3 major findings: increased urinary cortisol and catecholamines have been found suggesting increased activity of the HPA axis and arousal; increased global cerebral glucose utilization during wakefulness and NREM sleep in people with insomnia; and increased full body metabolism and heart rate in those with insomnia.

Types of insomnia can be classified to frequency or cause. For the former, transient insomnia lasts for less than a week, acute insomnia for less than a month, and chronic insomnia for longer than a month.
According to the cause, we can say there are two types of insomnia: primary type, in which insomnia isn’t related to any other health condition, and secondary, which is the opposite.

WEF survey

Conventional Pills

Medications are prescribed 95% of the time when treating this condition. However, do they really work?

Medical therapy with eszopiclone, zolpidem, and suvorexant improves global and sleep outcomes for insomnia disorder. Clinical significance, applicability, comparative effectiveness, and long-term efficacy, especially among older adults, are less well-known.
The Mayo Clinic also considers exogenous melatonin and valerian as alternative substances to take. They also suggest Cognitive behavioral therapy (CBT-I) when the patient prefers not to take any pills, when the condition is chronic, or when medications aren’t effective.

More specifically, these are the types of medications that can be used to treat insomnia. These are:
Benzodiazepines (BZD): five have been approved for treating insomnia by the FDA, including those with short-, intermediate-, and long-acting effects. They aren’t recommended for long-term insomnia treatment because of their high potential for abuse and dependence
Nonbenzodiazepines (Z): created to provide the same relief BZDs while reducing the adverse effects and abuse potential
Melatonin agonist: the medication known as ramelteon acts as a melatonin receptor agonist, and can be used to treat insomnia related to sleep onset, or falling asleep. Its effects tend to be less severe, though patients often experience dizziness, nausea, and fatigue
Orexin receptor antagonist: these are naturally neurotransmitters that regulate feelings of sleepiness and wakefulness
Off-label treatments: medications that are primarily intended to treat other conditions, like depression
Over-the-counter medications: these include melatonin supplements. They don’t need a prescription

On a more personal note, I would absolutely hate taking any of these pills just to be able to sleep. Other concerns I would have would be becoming dependent or even resistant to the effects of these medications, or hurting my body in any other way by taking them.

🧠 The Science


Talking about light… You may have heard about N-acetyl-5-methoxytryptamine before (AKA melatonin). It’s a key player when it comes to sleep. When people have trouble producing it naturally, they need to take it as a supplement.

Despite the common beliefs, melatonin doesn’t make you sleep. According to a Johns Hopkins sleep expert, melatonin puts you into a state of quiet wakefulness that helps promote sleep.

Now, we produce endogenous melatonin thanks to the pineal gland in the brain. Darkness prompts this gland to start producing melatonin while light causes that production to stop. Thus, melatonin helps regulate circadian rhythm and synchronize our sleep-wake cycle with night and day.

Going deeper into how this happens, we should know that the previously mentioned master clock, is a region of the hypothalamus, called the suprachiasmatic nuclei (SCN). Here’s a little bit about how the SCN is involved in sleep.

  1. SCN receives input from photosensitive ganglion cells in the retina via the retinohypothalamic tract.
  2. Neurons in the ventrolateral SCN can activate their genes according to light input
  3. When the retina receives light, ventrolateral neurons relay this information throughout the SCN allowing synchronization of the circadian rhythm
  4. SCN sends information to the pineal gland to modulate body temperature and production of hormones such as cortisol and melatonin

Summing up until this point, the SCN is a region in the hypothalamus, it is colloquially known as the master clock. It sends info to the pineal gland, which will use the available tryptophan to produce serotonin, and then melatonin.

That info/signal is called gamma-amino butyric acid. When the light signal is positive, the SCN secretes it, which causes the inhibition of the neurons that synapse in the paraventricular nucleus (PVN) of the hypothalamus, consequently the signal to the pineal gland is interrupted and melatonin is not synthesized.
On the contrary, when there is no light, the SCN secretes glutamate, responsible for the PVN transmission of the signal along the pathway to the pineal gland. The PVN nucleus communicates with higher thoracic segments of the spinal column, conveying information to the superior cervical ganglion that transmits the final signal to the pineal gland through sympathetic postsynaptic fibers by releasing norepinephrine (NE).

The exact way in which this happens in the pineal gland is that first serotonin is acetylated by a substance called aryl alkylamine N-acetyltransferase (AA-NAT). Then, it is converted to melatonin by hydroxyindole O-methyltransferase.
At the same time, serotonin comes from tryptophan, which is decarboxylated (loses a COOH group) to produce serotonin.

AA-NAT is the rate-limiting step for melatonin synthesis. Norepinephrine triggers the production of cyclic adenosine monophosphate (cAMP) in the pinealocytes, which promotes AA-NAT activity.
Once formed in the pineal, melatonin diffuses into the blood and the CSF.

The primary site of melatonin synthesis are the pinealocytes of the pineal gland. However, it is also produced in the retina, gastrointestinal cells, and lymphocytes, and its effects affect all the body.

Melatonin creation process

Once synthesized, melatonin is released directly into the peripheral circulation and to the CSF (Cerebrospinal Fluid). In humans, melatonin’s half-life in blood is around 40 minutes and it is metabolized within the liver, converted to 6-hydroxymelatonin mainly by CYP1A2 and conjugated to 6-sulfatoxymelatonin (aMT6s) for a subsequent urinary excretion

In the gut

Despite all the chemical reactions happening in the brain to go from tryptophan to serotonin and finally have melatonin, the truth is that more than 90% of serotonin is found in the gut. Why though?

The relatively short answer is that the gut is surrounded by enterochromaffin cells, which release serotonin in response to luminal distension, parasympathetic innervation, or changes in osmotic concentrations in the lumen. This helps regulates gastrointestinal function.

Just as in the brain, EC cells need tryptophan to produce serotonin. Still, the title of this article suggests that bacteria have to do something with all of this.
Well, indeed, human beings have the equivalent to 1kg of microbes in the gut, which are known as the human gut microbiome.

The microbiome comprises the community of microorganisms, living inside a host, as well as their surroundings and genomes. These organisms can be ones such as bacteria, archaea, fungi, algae, and small protists.

The vast majority of bacteria resides in the colon. In healthy adults, two bacterial phyla, Bacteroidetes and Firmicutes, dominate bacterial composition, with smaller amounts of Actinobacteria, Proteobacteria, and Verrucomicrobia.

Now, microbes aren’t the ones producing melatonin directly. However, multiple studies have already shown the clear communication between the gut microbiome and the brain.

This happens through a well known mechanism called the Microbiome-Gut-Brain-Axis (MGBA), where the main component is the vagus nerve.

The communication is bidirectional and happens through multiple pathways: neural through the Vagus Nerve (VN) and/or spinal cord, endocrine (through the hypothalamic pituitary adrenal, HPA, axis), immune (cytokines), and metabolic [short chain fatty acids, (SCFAs), tryptophan…]

Vagal afferent fibers are distributed to all the layers of the digestive wall but do not cross the epithelial layer, so that they are not in direct contact with the gut luminal microbiota. Consequently, these fibers can sense only indirectly microbiota signals, through the diffusion of bacterial compounds or metabolites, or thanks to other cells located in the epithelium that relay luminal signals.

Enteroendocrine cells (EECs) interact with vagal afferents either directly through the release of serotonin, activating 5-HT3 receptors located on vagal afferent fibers, or gut hormones such as cholecystokinin (CCK), glucagon-like peptide-1, peptide YY targeting the brain through vagal afferents which express receptors for these anorexigenic or orexigenic (ghrelin, orexin) hormones.

Thus, EECs are key players in the detection of luminal bacterial content and bacterial products that can regulate GI motility, secretion, food intake, through their indirect effect on vagal afferent fibers.


The correlation between the gut microbiome and the production of melatonin could have already been demonstrated when in recent studies which highlight that serum concentrations of 5-HT are substantially reduced in mice reared in the absence of microbial colonization (germ-free, GF), compared to conventionally-colonized (specific pathogen-free, SPF) controls.
GF mice also exhibit significantly increased levels of the Tph substrate, tryptophan (Trp), in both feces and serum, suggesting that primary disruptions in host TPH1 expression result in Trp accumulation.

Altogether, these data indicate that the gut microbiota plays a key role in raising levels of colon and serum 5-HT, by promoting 5-HT in colonic ECs in an inducible and reversible manner.

Now, here’s a shocking fact. A study done in 2019 discovered that total microbiome diversity is positively correlated with increased sleep efficiency and total sleep time. Specifically, phyla richness of Bacteroidetes and Firmicutes were positively correlated with sleep efficiency, whereas several taxa (Lachnospiraceae, Corynebacterium, and Blautia) were negatively correlated with sleep measures.

As previously mentioned, the relation between the gut microbiome and the brain is bi-directional, so the question would now be: are the microbes influencing sleep, or is sleep influencing the microbes?
Well, in humans, previous research has shown that partial sleep deprivation can alter the gut microbiome composition in as little as 48 hours. However, longer periods of sleep deprivation apparently do not have this effect, which could be suggesting that the microbes are overall in control.

A more recent study showed that high sleep quality was associated with a gut microbiome containing a high proportion of bacteria from the Verrucomicrobia and Lentisphaerae phyla.
Worth mentioning, the relationship between poor sleep and microbiome composition was maintained despite control in the carbohydrate intake.

Gut microbes can metabolize the essential amino acid tryptophan as a precursor for the synthesis of indole, serotonin, and melatonin, thereby limiting the availability of tryptophan for the host.
One of the questions here is: could that tryptophan be used to produce melatonin, or is it just used in the GI intestinal tract to control digestion?

Correlation between gut microbiome and interlukin-6

Additionally, bacteria like Streptococcus, Enterococcus, Escherichia, and Pseudomonas have been shown to synthesize serotonin from the available tryptophan via enzymes such as tryptophan synthase.
The reduction in the levels of circulating tryptophan by gut microbiota thus affects serotonergic neurotransmission.

A study done in 2019, demonstrated positive correlations between total microbiome diversity and interleukin-6, a cytokine noted for its effects on sleep. Phyla richness of Bacteroidetes and Firmicutes were also positively correlated with sleep efficiency, and interleukin-6 concentrations.
Similarly, IL-6 was positively associated with microbiome richness and total sleep time. While IL-6 also had a positive correlation with sleep efficiency, it was not significant.

To sum up, there is considerable evidence that the gut microbiome also regulates host sleep and mental states through the MGB axis. Evidence indicates that microorganisms and circadian genes can interact with each other.
Circadian genes can affect the intestinal microbiota, as much as the circadian rhythm of the microbiota can drive the transcription of host circadian clock genes and affect epigenetic modifications and oscillations in metabolite levels. Therefore, a specific link between the intestinal microbiota and the host circadian clock must exist.

The reason why these findings are so relevant in this context is that there is no doubt that the circadian clock genes are closely related to the development of sleep disorders such as insomnia.

As mentioned before, the metabolites produced in the gut mirobiome not only act directly on the ENS and the vagus nerve, but also affect the activity of the CNS by regulating enteroendocrine cells in an autocrine or paracrine fashion.

Despite these findings, further study is required to determine how the rhythmic activity of the intestinal microbiota participates in the circadian rhythm.
Thus, the first and most important question for this research proposal is

*How* exactly are gut microbiota influencing sleep?

💡The Solution?

Before actually coming up with a solution to insomnia, we need to be sure of how these mechanisms work. What are the precise characteristics that allow microbes to have this correlation with sleep?

Nevertheless, it is clear that if this correlation wasn’t just a coincidence, then synthetic biology could have a big role in designing the human gut microbiome and treat insomnia.

Living medicines

Living medicines are organisms such as bacteria, which have been genetically modified to perform a specific function or produce a therapeutic agent

Animal, bacterial, fungal cells, or viruses are genetically engineered, and are then injected into a patient. Sounds simple, but there are still some limitations and complications that we have to look after.

Credits to GROW by Ginkgo

One is that even though synbio is about standardizing life, we can’t be 100% about all the factors that are either external, or internal to the organism we are working with (eg. bacteria). This is the reason why we will always want to do mathematical models to know as much as possible about the chemical reactions that would be taking place thanks to our genetic circuits.

Another factor to consider is how our living medicines could interact with the already-existing microbiota. Could they do some horizontal transfer? Could they override other organisms? What will happen after the host releases them?

One strategy for the last concern are kill switches such that are designed for triggering cell death when bacteria escape. This way, the host’s inner environment would have control over the survival of those bacteria.

A question that we would also like to ask when we want to produce living medicines is “which type of bacteria should I use?”. Well, this will depend on the target site in the host body and the expected responses, including immune reactions. Lactic acid bacteria (LAB) are used in the food industry and have recently been used to deliver therapeutics.

The forms of administration may vary according to the target. These can be oral, to move along the gut and are be then removed from the body, intravenous, or intratumoral, which can assure a higher efficiency for cancer treatments.

Last but not least, we should consider that the rate and amount of medicine that is delivered will depend on how the genetic circuit. Promoters and ribosome binding sites (RBS) are some of the most important parts to take into account.


Probiotics are live microorganisms that have as a purpose to provide a health benefit to the person taking them. They can be found in food, and sometimes in beauty products as well.
It is most common to see organisms such as bacteria when referring to this topic. At the same time, some of the most common groups are Lactobacillus and Bifidobacterium.

Overall, how probiotics can help you, are by either creating a substance that you need, maintaining the already-existing community of microbes in your gut, or communicating with other elements of your body like the immune system.

Now, it is key to notice the difference between probiotics, prebiotics, and synbiotics. On the one hand, prebiotics are found in many fruits and vegetables; they are fibers, and they’re not alive. They stimulate the growth of healthy bacteria in your gut.
On the other hand, probiotics contain living organisms. They can be food and supplements, like yogurt, which is made by fermenting milk with different bacteria.
Last but not least, there are synbiotics. These stimulate the growth or activate the metabolism of health-promoting bacteria. The difference with the other two, is that synbiotics actually combines the previous. They are products in which the prebiotic compounds favor the probiotic organisms. They were developed to overcome the survival difficulties for probiotics.

Important to notice, the 2012 National Health Interview Survey (NHIS) showed that about 4 million adults in the US had used probiotics or prebiotics in the past 30 days.

In this case, we will focus on probiotics. The mains steps for their production are:

  1. Strain selection and isolation
  2. Media formulation
  3. Fermentation
  4. Centrifugation (to separate the probiotic strains from the metabolites)
  5. Cryoprotection
  6. Freeze drying
  7. Dosage
  8. Packing
  9. Quality control

In terms of the commercialization of these probiotics, some of the main points to take into account are:

  • If a certain microorganism qualifies as a probiotic, the next step is seeing if it can be cultured at an industrial scale
  • Probiotic commercialization should be run in parallel with clinical trials, to avoid studying an uncommercializable strain
  • Once high-quality probiotic bulk has been produced, the strain needs to be incorporated into consumer products


This said, the final hypothesis is that by genetically modifying bacteria to produce tryptophan or serotonin at a constant rate by sensing the metabolites produced by the host before they sleep, the bacteria will diffuse those substances into the vagus nerve and the pituitary gland will have the necessary substrates to produce melatonin: the host could be able to sleep.

As mentioned before, this idea would only work in the case that there is a clear relationship between the tryptophan produced by bacteria in the gut, and sleep efficiency, or final production of melatonin.

Even in this case, perhaps another less complex solution would be to think of bacteria like Enterococcus, Pseudomonas, Verrucomicrobia, or Lentisphaerae phyla as probiotics. Because of the capabilities that they have already shown to produce serotonin and tryptophan, they could simply be adapted to be orally-ingestible to avoid the host from having to have a fecal transplant.
There is actually a study that hypotheses the use of probiotics as delivery vehicles for neuroactive compounds.

Adding a bit of my opinion, I started doing research on synthetic biology and how we could standardize life in order to give solutions to complex problems. However, having done the research and finding out about the gut microbiome, I have concluded that probably synthetic biology isn’t needed in this case.
As I was mentioning before, if we can manage to use bacteria as probiotics, and they can achieve the function of creating the necessary substances, there wouldn’t be a need to even genetically modify those.

💭 Last thoughts

The microbiome revolution is taking place right now with hundreds of research studies being done to know how the trillions of microbes can communicate with other parts of the human body.
There is no doubt that they somehow correlate with sleep. However, the assumptions that could now be made, are possibly not that accurate. Thus, it is essential to continue studying this topic at a more specific level. This is, for specific bacteria species, and in the context of the production of specific substances.

When we get to understand the mechanisms through which the gut microbiome affects sleep, we will be totally able to shape it thanks to the already-advanced field of synthetic biology. Knowing which substances are present at different stages of the circadian rhythm, it will be possible to control the production of the substrates, and use bacteria as living medicines.


Hey! I’m Sofi, a 16-year-old girl who’s extremely passionate about biotech, human longevity, and innovation itself 🦄. I’m learning a lot about exponential technologies to start a company that impacts the world positively 🚀. I love writing articles about scientific innovations to show you the amazing future that awaits us!
Twitter | LinkedIn | Website | Podcast | Newsletter



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store