Biohacking sleep

Last update: 2019-01-03

Improving sleep quality

This is where the new lifestyle starts. Good sleep is paramount to physical and mental health. If you fix your sleep, it will be much easier for you to work on all other areas.

Before applying any of the below tips, I recommend reading books listed at the end, as well as my sleep summary section about how sleep works.

General rules

  • Establish a daily routine (physical and mental).
  • Stick to a sleep schedule. Go to bed and wake up the same time every day, even on weekends.
  • Take your time and be patient. Changing circadian rhythm is not just going to bed and waking up earlier. Your whole metabolism changes also. All your cells must get used to the new schedule.
  • If you do not measure something, it means you do not manage it. Get yourself some device (wristband, ring, watch) to measure your daily activity, especially sleep.


I used to go to bed at 1-2am and wake up at 8-9 am. Now, for many years I go to bed at 9 pm and wake up at 5 am. However, I did not switch my timing over one night. I planned it carefully with the calendar. I was shifting my “night” gradually 15 min backward every two nights. I was set up after one month. Just stick to the schedule. You can also make faster shifts, but you have to be strong during the first two weeks. I tried it also, and I felt like a zombie, so I slowed down.


Your bedroom should be a silent, dark, and peaceful cave. There should be no working, no eating, even no reading there. Your brain works on habits and neurons should wire only one habit associated with that place: sleep.

Already tested and using:

  • Blackout curtainsDONE
    • Make sure the curtains are really black, covering the whole window. Some curtain rods leave lots of space under the ceiling, letting the light in – the closer to the ceiling the better. If you have multiple, split curtains, they should overlap, leaving no space between them.
    • Remove everything that emits constant light from your bedroom. If not possible, darken the LEDs of your electronic devices with black adhesive tape, but be careful, some devices emit heat (chargers), and the tape starts rippling. It may also emit some toxic chemicals.
  • PillowDONE
    • Use a therapeutic pillow (memory foam) that supports the neck. I recommend purchasing it from a specialized shop, not from common interior shops (usually worse quality).
  • MattressDONE
    • Have a hard and solid mattress to support your spine. Make sure it’s made of some organic material.
  • Limit EMFDONE
    • Switch your mobile devices off or put into flight mode. If possible, remove any other electronic device from your bedroom.
    • I was thinking about turning off my WiFi at night, but unfortunately, my wife sometimes has to work late. Disabling WiFi means usually turning the router off (timing with smart plugs), but maybe I will write some script to disbable just antennas between 11 pm and 5 am.
    • Habit tip: place a post-it note on your night table with a reminder to enable a flight mode. It worked for me. I kept forgetting to enable a flight mode, even if I set my SleepCycle alarm every day.
  • ClocksDONE
    • Remove all visible clocks from your sight. When you wake up at night, you won’t get stressed with how late it is.
    • Regular morning alarm is very stressful for your body and can wake you up in the middle of a sleep phase – you wake up tired and groggy. Use the SleepCycle app to wake you up when sleep phases are about to end.
  • Fresh airDONE
    • The optimal temperature for most people is around 18–22 degrees Celsius; the lower, the better. Melatonin goes up when it gets dark but also cooler.
    • Adjust your heater, and ventilate the bedroom during the day. Leave the window open, and close the door. Also, ventilate the bedroom at night, but avoid a direct draft near the head.
    • If you leave in a polluted area, opening a window at night may bring many toxins in, so sometimes it’s better to use an additional device. Use air humidifier or purifier. Most people prefer 30–50% humidity. I purchased a PM2.5 sensor to check my air quality. It’s fairly clean, so I got myself a cheaper humidifier with essential oil diffuser and ionizer. Purifiers are usually more expensive.
    • Habit tip 1: watch this, and link two habits together as a morning routine, make your bed, and open the window.
    • Habit tip 2: place hanging humidifiers filled with water or a wet towel on a radiator.

Still investigating:

  • EMF
    • There are some Anti-EMF devices available, absorbing or limiting EMF.
  • Plants

    • Houseplants increase humidity, turn carbon dioxide into oxygen, and release negative ions into the air (golden cane palm, snake plant, and devil’s ivy).
  • Aromatherapy

    • Lavender or Jasmin oil increase slow wave activity and boost memory, enhance deep sleep, lower stress, blood pressure, heart rate, skin temperature, and cortisol levels. They can be used with a dedicated diffuser or built-in into a purifier.
  • White noise
    • Fans, purifiers and humidifiers create white noise which promotes a meditative state. The problem is that it should be adjusted to sleeping cycles.
    • There are some sleep masks with built-in earphones. You can use an app, which monitors your sleep phases and adjusts the sound
  • Salt lamp
    • Use special lamps that change the spectrum of light, according to the cycle of the day.
  • Chilipad
    • There are some pads you can place on your bed to make sure your body temperature stays optimal during the night.

Food and supplements

Not only what you eat is important, but also when you eat. I will cover it more deeply in a separate article, but in short, the main idea is to eat always at the same times, and not to eat just before going to bed. Stomach acid is secreted more at evening to digest all remainings. It makes sure that unfriendly bacteria are not entering your gut (intestines become quite inactive during the night with weaker defense). If you eat late, there is lot’s of acid in your stomach and food stays there for about 2-5 hours, before moving to intestines. Then, after you lie down, there is no gravity helping to move your bowel. You may get acid reflux and constipation. Your eating habits influence how you sleep.

Already tested and using:

  • Eating timeDONE
    • Eat last meal no later than 4 hours before going to bed.
  • MagnesiumDONE
    • Magnesium helps optimize circulation and blood pressure, balances blood sugar, reduces muscles tension, and calms down the nervous system
    • It is recommended to supplement magnesium citrate, glycinate or taurate, as they provide the best absorption level.
  • Heart stimulantsDONE
    • Avoid theobromine and theophylline, which are found in chocolate, at least 6-10 hours before going to bed. They are heart stimulants (help to widen veins).
  • CoffeeDONE
    • Avoid caffeine 8-10 hours before going to bed.
    • Habit tip: Coffee is one of the strongest addictives. I switched to keto and bulletproof coffee and it helped a lot. I also do intermittent caffeine detox – no coffee for one week a month – it makes caffeine work better during remaining weeks, no need to drink more than 2-3 cups between 9 am and 3 pm.
  • AlcoholDONE
    • Alcohol reduces REM sleep. Quit drinking alcohol. If you have to, have your last glass no later than 90 minutes before going to sleep.
    • Alcohol is one of the strongest addictives. You have to work on your habit gradually.
  • WaterDONE
    • Drink last glass of water about 90 minutes before going to bed – controlled dehydration, so you do not have to get up at night to pee. It may be challenging if you take medicines before bed.
    • Habit tip: use a waterminder app to control your water ingestion level and times during the day.

Still investigating:

The below hints were found in miscellaneous places, and for me, they are very hard to test and verify, as the outcome might depend on how you feel, what you ate, what was your daily activity, etc. How to measure them if they are helpful? Does it work or placebo? Does anyone have any experience with it?

  • You can use 1000–2000 mg of vitamin C to make caffeine leave the body quicker or chew whole cardamom seeds to de-stimulate the central nervous system.
  • Eat four sticks of celery with almond butter.
  • Take krill oil two hours before bedtime; omega-3’s help with sleep processes.
  • Take potassium citrate with magnessium. We usually have enough potassium, so supplementing is optional. Magnessium is used up much faster.
  • Take GABA, preferably  4-Amino-3-phenylbutric.
  • Try taking 5-HTP for natural melatonin secretion support.
  • Tryptophan is a precursor to serotonin and melatonin. Eat 1-2 hours before going to bed: white rice, banana, pumpkin seeds, turkey, chicken, eggs, nuts, whole grains, lentils, sesame seeds, sunflower seeds, white fish, avocado. Take calcium and Vit. B6 for better absorption.
  • Try up to 1 tbsp of raw honey before bed on an empty stomach. It will replenish the glicogen from the liver, creating stable glucose supply for hours.
  • Herbal teas, such as green, chamomile, peppermint, lavender, valerian and hibiscus reduce inflammation and induce relaxation. They’re also very good for detoxification and improve our immune system. However, don’t fill your bladder up before bedtime. Kava Stress Relief tea is very good but expensive. – I tried green tea, and valerian tea, not really convinced or at least didn’t notice a significant difference.
  • Ashwaganda calms down adrenal glands (the stress glands).


Already tested and using:

  • GroundingDONE
    • Walk barefoot during the day from time to time
    • There are some special flip-flops with grounding aid – to be investigated
  • WalkingDONE
    • Take a minimum 15min walk in the evening. You will let your mitochondria to burn excess energy.
    • Take 30 min walk after lunch to get a sunlight.
  • ExercisesDONE
    • Avoid exercise for two hours before going to bed (rises body temperature and releases cortisol). Exercise in the morning and early afternoon. Best time for strength training is 3-6 pm. Blood pressure is better afternoon, so it’s better oxygenation of muscles.
  • Clean your mindDONE
    • Make plans for tomorrow so you can sleep without worrying that you forgot something. When planning, you usually set many goals, but choose 2-3 of them which will make you excited in the morning – reason to get up.
  • TemperatureDONE
    • Take hot bath 1.5h before going to bed. Your core temperature must drop by 1 degree of Celsius. Hot bath extends blood vessels, so blood travels easily to the skin. The heat is radiated, and the core temperature drops.
    • Wear warm socks while in bed. Do not use ones with tight rubbers, as you will restrict blood flow in your legs.
  • Ease your mindDONE
    • Stop working 1-2 hours before going to bed. Start your evening routine, relax.
    • Avoid TV, especially action, violent movies. Read some books.
    • Practice some yoga or mindfulness meditation in the evening; it releases GABA.
  • Blue lightDONE
    • Blue light is beneficial during the day as it increases attention, reaction time and mood, but it stops melatonin secretion in the evening.
    • Use software to limit blue light (f.lux for PC or Nightshift feature on Apple’s devices) – activates automatically at defined hours. It helps to ease your eyes, but it’s not real blue-light blocker.
    • Wear glasses blocking blue and green light. For the best effect, they should wrap around your eyes. Start wearing after the shower, as any blue light stops melatonin secretion; you have to take off glasses for taking a shower. You may also take a shower with lights off, which good for rewiring your neurons.
  • StudyDONE
    • It is recommended to go to bad 3h after studying. Do not study just before going to bed.


If you cannot fall asleep for 30 min, do not force yourself, as your anxiety will increase and cortisol will rise. Get up, read a book (not iPad).

Already tested, and using:

  • EarplugsDONE
    • Use earplugs suitable for sleeping, as they may harm your ears while lying on your side. They can help you especially if your family members go to bed much later than you.
    • Remember to clean them from time to time to remove germs (especially if you leave them on a night desk for a whole day without any cover or box)
  • Eye maskDONE
    • Use solid, good quality eye mask, even if you have blackout curtains. I go to bed much sooner than my family members, and they switch on lights accidentally in my bedroom. Bright light in the middle of the night can collapse your whole circadian rhythm. Also, with the mask you won’t notice the short wake ups in the middle of the night.
    • Make sure the strips holding the mask are comfortable, as some rubber strips make pressure on your ears.
  • MeditateDONE
    • When already in a bed, get into a meditation state, you won’t even notice when you fall asleep
  • Short stressDONE

    • While in bed, tense ALL possible muscles for 10 seconds. After you let go, it will be easier for them to relax.
  • Sleep massageDONE
    • There is a nerve called vagus. It is located inside a skull, at the back of a head. It’s part of the parasympathetic nervous system, and it connects the brain with the rest of the body. The vagus nerve transmits circadian signaling. To stimulate your vagus nerve prior going to sleep, rub your ears for a while.

Still investigating:

  • Nasal Strips
    • Learn to breathe through your nose. Use a nasal strip or a nasal spray to keep your respiratory tract open
  • Position
    • Sleep on your back or right side. Other positions put stress on your internal organs. Can you control it while sleeping?

Waking up

Already tested and using:

  • Alarm clockDONE
    • Use SleepCycle app to wake up during a proper phase.
    • We subconsciously associate the alarm with a stressful task. Change alarm tone every week to rewire your neurons.
  • Just get upDONE
    • Waking up is purely habitual. Develop a habit of getting from bed with the first ring.
    • If you wake up in the morning, simply get up, do not use a snooze button. Using a snooze button means you stress your cardiovascular system with spikes of blood pressure many times, whenever your alarm sets off.
    • If you snooze, you may enter next sleep phase and wake up in the middle. You will feel very tired and groggy.
    • Do not check email on the phone after you open your eyes (I used to do that very often); it will increase your morning stress (sabotage yourself with negative morning self-talk) and extend your time in bed (that’s how you get out of sync with your daily routine)
  • Make your bedDONE
    • Train your self-discipline and consistency. Make your bed, open curtains, get the sunlight (summer), and open a window.
  • RehydrationDONE
    • Ingest one full glass of water with 2 tbsp of lemon juice (to balance gastric acids). You may also add 1 tbsp of an apple cider vinegar and half a teaspoon of salt (for your adrenal glands). Drink with straw to protect teeth.
  • Reset circadian clockworking on it
    • Take a 10 min walk after you get up (summer time) to catch the sun and boost circadian rhythm. The light should be at least 1000 lux to have a resetting effect. Home lamps usually have 320–500 lux, direct sunlight is 32,000 to 130,000 lux.
    • You may combine it with morning exercise and grounding (walk barefoot).
  • Mobilize your bodyDONE
    • Do morning stretch. Jumping jacks, push-ups. Hand- or headstand, to improve the circulation in your body and to boost your adrenal glands and lymph flow. Do not exercise in the morning for strength. Muscles are full of energy at 2-5 pm. You are prone to injuries in the morning.
    • Try yoga exercises called “Ancient Secrests if the Fountain of Youth”.
  • Cold thermogenesisDONE
    • It triggers anti-inflammatory norepinephrine and increases the strongest antioxidant glutathione. It also improves blood circulation, boosts the immune system, and increases your tolerance to stress. Cold increases mitochondrial density. You’ll feel more energized with better ATP (energy molecules) production.
    • Take a plain warm shower, but finish with a cold one. Alternate five times for 20-30 sec. in a hot and polar cold stream. If you choke with breaths, your system is not stabilized.
    • Breath slowly during cold shower. Do not force it. Breathe a few times before, start with hands, legs, then slowly back and full body around.
    • Habit tip: Read “Eat that frog” – if you pass through this shower, everything else during the day will seem to be much easier 🙂
  • Hyperventilationworking on it
  • Bulletproof coffeeDONE
    • If you are on a keto diet, bulletproof coffee is a very good way to postpone your breakfast until noon.
    • If you execute the above morning routine, you will be so energized, that the first coffee may be needed 2-3h after you wake up.
    • My recipe: pour hot water to a blender to heat it, prepare fresh coffee, remove water from the blender, pour in your coffee, add MCT oil, cinnamon, curcumin, cardamon, a little cream, blend it. I add BHB, cayenne pepper, and 1 tsp of some collagen to the first cup.

Still investigating:

  • SAD lamp
    • SAD (seasonal affective disorder) happens during the late autumn and the winter season. You should reset your circadian clock with good sunlight, which is not available during winter, especially if you wake up at 5 am.
    • There are some SAD lamps with a power of 10.000 lux, emitting sun-like light.

Power nap

Naps can improve memory, reduce stress, increase alertness, enhance relaxation and mood. They can alos help you repair your sleep debt. However, sleeping at random times and for loo long can mess up your circadian rhythm and may keep you up at night. When napping, you have to make sure you are not falling deeper than the N1 and N2 stages of sleep. Naps should last either no longer than 25 minutes (NASA powernap lasts 26 minutes), or full sleep phase of 90 minutes (only if you need to catch up some sleep). The best time to nap is about 6–8 hours after waking up. The later you wake up, the shorter the time before nap should be. If you wake up at 6am, nap at 1:30pm. If you wake up at 9am, nap at 3pm.

Already tested and using:

  • Lie on a floor on a spike mat (releases endorphins and increases blood flow), with legs bent in the knees lying on a chair or a bed.
  • Cover your eyes with a sleeping mask. Relax, breathe in deeply and calmly. You may open the window to let some fresh air in.
  • Use headphones and brain stimulating music (I use the Pzizz app, the best one I’ve tried). The sounds available are amazing, and there is additional waking phase.

Still investigating:

  • You may ingest a cup of coffee just before a nap, as the caffeine will kick-in in about 30 min, just after you wake up, and you will have a double boost.

Flight and jetlag

Flying tips:

  • It’s harder to acclimate when traveling eastward (you need to fall asleep earlier than usual) than westward (you have to stay up longer). It’s easier to stretch the day than to shrink it. Use melatonin pills traveling eastward. Move bedtime towards destination time zone (sleep deprive little) before a long flight.
  • Your suprachiasmatic nucleus (internal clock) can only readjust about one hour each day after changing a time zone.
  • Eating at the time according to the new time zone is the fastest way to reset the gut clock
  • Eat lots of food with DHA and omega-3 fatty acids. (to be investigated)
  • Drink some baking soda which promotes electrolytes and stabilizes ph.
  • Take charcoal before and after a flight to protect your stomach from germs on a plane.
  • Take Vit. C (1000mg) after landing
  • Sit in the aisle to limit cosmic radiation. Also, you will have more space for legs. It’s also easier to stand up and walk. Radiation is less close to the equator (magnetic field), during nights, and between clouds.
  • Walk once every 30 min. Mobilize body, do some stretching.
  • Do not wear tight clothes, free your muscles and veins. Wear warm clothes.
  • For longer flights wear a sleeping mask, and earplugs, take a pillow to hold your neck.
  • Touch ground (grass is best) with bare feet to let charges stabilize (where can you do that on the airport?)

Lucid dreaming

This topic is quite interesting, and I plan to investigate it more deeply. I had several lucid dreams in the past, and the feeling was mindblowing. Among other experiences, I noticed that problem solving, and creativity during lucid dream are limitless.

We can have lucid dreams because the frontal lobe becomes active during REM. This area of the brain is responsible for consciousness. However, lucid-dreaming is not an easy task. First, you have to become aware, that you are dreaming, second, you have to remember the dream after you wake up. We forget about 95% of our dreams.

Practicing lcuid dreams:

  • One of the most important tasks is to keep a diary.  Place it on a night desk, so you can store your dreams almost instantly after waking up. If you think of something else, the dream is gone. Write whatever, even if you don’t remember anything. It’s a matter of developing a habit. Be honest, and keep your diary secret, as weird things can happen during LD 🙂
  • Perform reality checks during the day. The best way is to look at your hands. Then look ahead at something different, and check hands again. Hands are detailed enough to see a difference. There are some apps with a reminder.
  • Most of the lucid dreams appear if we wake up during the night. If you wake up during wrong phase, you will not remember your dream. The best effect is to wake up after fourth or fifth cycle, ie. after 6h or 7.5h of sleep. Although fragmented sleep is very bad, its OK to wake up once with a SleepCycle app, just to try it out.
  • Practice affirmation before falling asleep. Assure yourself that you will have a lucid dream this night.

(to be investigated more)

What influences sleep


Caffeine acts as a masking agent by attaching to adenosine receptors. We chemically cheat our brain. However, the more coffee you drink, the more neuroreceptors are produced, and more coffee is needed to mask them. In the end, you end up with a headache and sleep issues.

Caffeine peaks around 30 min after oral ingestion. Half-live is 5-7h, which means you still have half of it in your bloodstream after ~6h. Do not drink coffee less than 10h before going to bed. Caffeine is removed within a liver.

If you cannot stay awake without caffeine for first several hours after you wake up, you probably have chronic sleep deprivation.

Sleeping pills

Sleeping pills act like alcohol, they knock out your higher cortex areas and make you unconscious, but don’t make you sleep. Medication-induced sleep does not provide the same immune benefits as natural sleep. Do not take sleeping pills, including melatonin in the long run. Two weeks is maximum. They are usually very addictive.


Melatonin level is controlled by the level of light reaching hypothalamus, but also by the temperature caught by thermo-sensitive cells. It initiates the event of sleep but does not participate in the sleep itself.

Light directly affects the production of melatonin (and cortisol). Exposure to even small amounts of light (especially blue wavelength, around 420–485 nm) can suppress melatonin secretion and increases body temperature and wakefulness. Morning light (even through shut eyelids) stops melatonin secretion. Reading an iPad in the evening, instead of a printed book, suppresses melatonin secretion by 50%.

Taking external hormones when your body can produce it, makes you dependent. If you mess one hormone, other hormones are impacted too. Most melatonin supplements are way too strong (3-5 mg, 1 mg is usually enough), which causes elevated levels the next day and may negatively impact your body’s natural production over time. Use only if you are shifting your sleep time to earlier or later (jetlag). Do not eat them after a meal, as it slows down the decline of blood glucose to a normal level. Wait for at least 2h.


Alcohol is one of the most suppressors of REM sleep. (still investigating)


Recommended books

  1. Why we sleep; Matthew Walker
  2. Sleep Smarter; Shawn Stevenson
  3. Head Strong; Dave Asprey
  4. The Circadian Code; Dr. Satchidananda Panda


  • Pzizz – very good app for power naps. Many available relaxing sounds, but also has waking sounds, which work perfectly. Use headphones.
  • Sleep Cycle – very good app for monitoring your sleep, however not very accurate, as it uses phone’s mic. However, its is the best alarm clock ever, as it monitors your sleep cycle and wakes you in the proper phase, so you do not feel groggy after waking up. Highly recommended.
  • Waterminder – control your water ingestion, not only how much water you should dring, but also when
  • F.lux – blue-light blocking app for PC



I am not, by any means, neither a doctor nor a pharmacist or a scientist. I am just a simple engineer. I am collecting and investigating many different lifestyle, mind, and body improvement techniques, found on the Internet, in books, articles, and I will test them on myself. Do not take any information posted here as a reliable source of information. Assume, that every sentence in my article starts with “someone on the Internet said…”. I take no responsibility nor liability for any damage or injury anyone can suffer from applying any of the mentioned techniques, digesting food, drugs, or performing exercises, whatever may be the cause. This article is for informational purposes ONLY. Whatever you do, you do at your own risk.