Yes, Your Poop Bacteria Can Affect How Well You Sleep


How could our intestinal bacteria affect our sleep? The bacteria actually make chemicals that we steal from them in order to sleep normally; those chemicals are called the B vitamins. (And, those of you who don’t like vitamins and are about to skip this part, you do need to understand this or you will never sleep normally, or fix your headaches, or get out of your doctor’s office.)

The B vitamins are 8 chemicals that our bodies are unable to make. They were first discovered as bacterial “growth factors”, chemicals that had to be added to the petri dish to grow bacteria. Bacteria had just been discovered and scientists were experimenting with how many different types of bugs they could find and name after themselves. Just like making beer or bread, the recipe had to be just right. They discovered that the same yeast preparation used to make beer and bread would encourage specific bacteria to grow. There were actually bacteria and yeast in that beer or bread culture.

Eventually the scientists figured out that our human cells needed these “growth factors” too. We couldn’t live without them but we couldn’t make them ourselves. (Which a bit odd when you think about it,  every cell in our body needs this chemical to run properly but we can’t make it ourselves? Sort of bad planning!) For humans they called these chemicals “vitamins”, instead of growth factors. Once they got around to purifying the different chemicals they started naming them the “B’s” because they came after vitamin A was named.(duh!) Several chemicals were eventually grouped together as “B vitamins”, partly because some came from the same yeast broth, partly because they were all water soluble but also because they seemed to need each other to do their jobs. There were originally more than 8 (thus cyanocobalamin was named B12) but some,  B4, B8, B10 and B11 that were originally numbered eventually lost their status as “vitamins” because it turned out we could make them ourselves after all, so now there are only 8 B vitamins.  They are numbered and named, which makes the whole thing very, very confusing! Thiamine is B1, riboflavin B2, niacin B3, pantothenic acid B5 , pyridoxine B6, biotin B7, folate B9, and cyanocobalamin B12. You do not need to memorize this, you just need to know that they were meant to come together as an “eight-pack”, the 8 chemicals work together.

We learned about how these chemicals work together from the study of bacteria. Bacteria need these chemicals to make energy and grow, just like we do, and there are certain bacterial species that can make some of them but not all of them. The only one we can make ourselves but is still considered a vitamin is niacin (if we have protein in our diet we can make niacin from tryptophan).

The first microbiologists (study of tiny, living things) found that there were bacterial species that could make riboflavin, B2. The bacteria made it for their own use but also released it into their surroundings. Next, they discovered that the riboflavin-producing bacteria wouldn’t grow by itself in a petri dish because it couldn’t make folate, B9. But if there was a second type of bacteria, that did make folate (but couldn’t make riboflavin), and the two were grown together, they could trade riboflavin for folate and both would be happy. Because of their shared needs the two types of bacteria appeared together and were said to have a “symbiotic” relationship; they each benefited from the presence of the other.

Now, back to our intestinal bacteria……The reason why the same foursome of bacterial species is found in every human with a “healthy gut” all over the world, is because each of the four makes at least one B vitamin and needs other B vitamins that the other three make and share. In other words, they need each other. They are a “commensal foursome”. And, they are secreting those vitamins into our intestine, making a sort of “B vitamin soup”. Picture all those little bacteria happily growing in their vitamin soup, which happens to be inside us!  Why did they desert us? They were so happy in there, and we needed them!  They deserted us because we stopped giving them what they needed from us, they need our vitamin D. We give them vitamin D, they give us B vitamins, everybody wins, we’re both thriving and happy! We had a symbiotic relationship with the bacteria in our intestine. Then, oops….. we go inside, stop making vitamin D on our skin from the sun and we can no longer provide our side of the bargain. The good guys are now slowly replaced by bacteria that don’t need vitamin D. Now we have the “wrong” bacteria and all the bad things associated with that “wrong” bacteria; irritable bowel syndrome, multiple allergies, or autoimmune diseases. The B vitamins don’t really come from the food, they come from the normal bacteria inside us. It has been that way since the first multi-celled organisms evolved with bacteria in their gastrointestinal track. There was never any reason for us to make the B vitamins because we always carried our source inside us! Read more at: Why the American Diet does not deserve all the blame

20 thoughts on “Yes, Your Poop Bacteria Can Affect How Well You Sleep”

  1. Dr. G,

    Is it possible to be deficient in B12 without also having low D? Also do you believe the intestinal bacteria be corrected with dietary changes (along with D supplement/more sun exposure), or is taking B’s necessary in all cases?

  2. Dr. Gominak,
    I have gotten my Vitamin D level to 57 and have been supplementing with the B’s for awhile but still have burning feet, tinnitus, and a sore tongue. I have had digestive issues all of my life and I am now 54. I have tried eliminating inflammatory foods but still haven’t gotten any relief. I was not breastfed and was on antibiotics on and off for most of my childhood. Recently I seem to be having some luck with a particular strain of probiotic-could it be that I have so much pathogenic bacteria that simply taking the B’s and getting the D level up isn’t enough?


  3. Dear Dr. Harsha: Thanks for your question.
    The first difficulty is which B vitamin are you referring to?
    Once that is answered we still don’t have an answer because we don’t know the following:
    Which forms of the various B’s do the normal bacterial species in our gut make for us naturally?
    What are the normal hourly doses made by our small and large intestine when the four normal species are present?
    Scientific study of these questions have never been performed because it is not until the last 2-3 years that
    anyone proposed the idea that all of the B’s are naturally produced for us by our normal microbiome.
    All of the daily recommended doses made up by whatever agency published a “recommendation” were created in the context of
    “B vitamins come from the food” which is an inaccurate assumption for some if not all of the B vitamins.

  4. Dear Dr Stasha

    Is it safe to give vitamin B 50 Complex as well a multi-vitamin to my son who is 10? I have purchased your RightSleep workbook and wanted to clarify on this before he starts. His Vit D3 level is 36.4 ng/ml. Thank you.

    • Dear Jann:

      I usually cut the B50 by half for kids under about 11-12. I give the equivalent of B25 by giving 2.5 of the Flintstones Complete, or something similar that has 10mg of B5 so 2.5 is 25mg and it is 2.5 times the doses of the other B’s. Just be sure the child multi has all 8 B’s and 10 mg of B5.

  5. Dr Stasha Gominak .
    I have tried vitamin D but there’s some controversy about taking D3 with calcium channel blockers or diuretics prescribed for high blood pressure. Also some people recommend taking K vitamins to complement with vitamin D . Also is vitamin D same as D3 ?


    I use to have bacteria overgrowth and saw a functional doctor. I took anti parasite supplements along with probiotics and cut out all inflammatory foods. I am now free from bloating.
    My bloodworks showed I was low on all B vitamins and vitamin D. I also have MTHFR so I took specific type of B for that condition.
    I am taking D liquid currently with very small dose Bs. I am in so much hip, back and rib/chest pain. It is affecting my sleep. I eat very healthy, walk everyday, i do deep breathing relaxation and stretching, I am not stressed except for the pain and interrupted sleeps. This has been going for 2 months and I dont know what else to do.
    My bacteria overgrowth treatment was 10 months ago.
    The joint pains have been going for 2 months.

  7. Dr, Gominak
    I’ve been supplementing vitamin D for 4 months to improve my health but specifically my sleep, I usually can’t sleep till the early hours of the morning and if so it’s only for a few hours and I don’t feel rested I also have gut issues such as a runny belly. I’ve read all the great information on here and my vitamin D level is in the suggested range but I haven’t taken either b50 or b100 to help gut bacteria, is it too late now to take let’s say take a b50 for 3 months or will a b5 defiency now have occurred since I’ve supplemented vitamin D for 4 months including the 2-3months to get levels up?

    • Dear Kyle: it’s never too late to convert your gut bacteria. Do it now. Take B50 for three months then stop. Then as long as you maintain your D level above 40 for the rest of your life your bacteria will not desert you.

  8. What about northern people who don’t get much sunlight for half the year and because it is so cold outside they are completely covered up when they do out? How do they make enough D vitamins?

    • They don’t, that is why there are mutations converting the skin to white or pink or hair to white or red.
      The inuit people who have maintained a dark skin color would survive by eating raw liver and blubber of the animals they killed which are the only true nutritional sources of D3.

  9. Dear Dr.Gominak,

    I’m at the very beginning of the process described in your workbook (day 5 on 15 000 vitamin D, B50 and multivitamins with low dosage of B), I was wondering if having microbiome test on top of vitamin D and B12 tests I already had would be beneficial and would help me to track the progress along the way? In particular, I was thinking about What do you think?

    Thank you!
    Kind regards, Tatiana

    • Hi Tatiana: I don’t think the microbiome tests are helpful. The D plus B50 for three months accomplishes what you want.

  10. Dr. Gominak: REALLY enjoyed your talk during the Oral and Functiinal Airway Summit. Thank you SO much.

    What are your thoughts about also simultaneously measuring the inactive form of Vit. D (D-125) at the same time that you draw for D-25? I have previously had fairly low D-25 but very high D-125. Is that caused by Vit. B deficiencies? Or are there other causes for that?

    • Hi Nancy: Thanks for your question. The “active” form D3 1, 25 OH that you’re referring to does not go into the brain. We’re measuring the D 3 25OH that does go into the brain and helps us sleep. I don’t know the relevance of D 1,25 OH to sleep and its value goes up and down all day in ways that are incompletely understood, (as is much of D’s actions).

  11. Hi Dave: If your second D test is still pretty low, in the 20’s or low thirties then I suggest that you take the B50 for 3 1/2 to 4 months instead of three. Most people have a second D test that is at least in the 40’s and just need B50 for three months total.

  12. Dear dr Stacha,
    I am working with the right sleep program and I just finished my first 3 months of b50.
    Unfortenately at the same time I had to take antibiotics. Would this distroy what just has been build op in my gut? Should I have to take B50 for another period of time?

    Thank you for your inspiring words in workbook, video’s and blogs and for your humor. My mantra now when I lie awake: Relax, It is not my fault. We are working on it.

    • Hi Ria: once your normal microbiome is established antibiotics will not change that. You do not need to do the B50 again. This is covered in the FAQ’s section


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.