I did multiple sleep studies, used sleeping medications, took supplements, tried to meditate, etc. and had no luck.
I went and did CBT-I, where they had me change my sleep hygeine (all your standard recommendations of "no TV in the bedroom", etc). But the biggest thing was they had me start off by going to bed at 1 am and waking up at 5am every day for a week or two. I'd be so insanely tired, I would start falling asleep quicker and staying asleep less interrupted (this was recorded on a worksheet). Then they had me go to bed an hour earlier, record it. After a while, we found my optimal schedule (bed at 11am, wake up at 630am), and I stick to it no matter what, every single day.
It's solved my sleep issues, full-stop. I get tired by 11 pm, and wake up at 6:30 am feeling just fine.
FWIW, grad school - with no solid schedule - was disastrous on my sleep. Moving to my 9-5 corporate job has made scheduling my sleep a whole lot better.
Just my experience.
Interestingly, this is on a 90 minute boundary, so you should naturally be in a wakeful sleep state when you awake. I’ve found that 7.5 hours is best for me too, because 6 hours isn’t long enough and 9 hours is too long, so 7.5 is the sweet spot (and anything not on a sleep cycle boundary and I wake up very tired). 11pm also seems to be the best time for me to go to bed, although I’m naturally a night person, but if I have to work, going to bed later doesn’t leave me with enough time to get 7.5 hours and still make it to work.
So... I didn’t try a process like yours to find my optimal times, but mine seems to be quite similar to yours.
Having said that, I’m not a light sleeper in that some noise doesn’t bother me or wake me and I normally don’t have much trouble getting to sleep, but I do find I often wake up still tired. Its mostly solved by keeping a consistent sleep schedule and sticking to 7.5 hours.
After much research I believe I have succeeded in finding the root cause. Cells in your body need calcium to go into ON state, and to turn OFF magnesium needs to go in and displace the calcium. Stress depletes magnesium. When your body runs out of magnesium your cells can't turn off. Then your muscles become stiff and when your brain cells can't go into OFF state you can't sleep. The solution that works well for me: magnesium supplements, especially magnesium l-threonate, which can pass through what is known as the blood brain barrier. This solved my insomnia as well as muscle stiffness.
- Adults age > 30 usually need 420mg of Mg however more than 350mg from supplements is discouraged
- Going little bit over for Mg seems ok because kidneys just exerts it to urine. However very high dosage like 5000mg would cause magnesium toxicity.
- Multivitamins like New Chapter Calcium tabs have 770mg Ca and 58mg Mg. This means these should be taken in morning.
- Nuts like Almonds and cashews have tremendous amount of Mg. Just 4-5 ounces of these nuts will make up for daily dose.
- Diets with higher amounts of magnesium are associated with a significantly lower risk of diabetes.
- Magnesium is involved in bone formation and influences the activities of osteoblasts and osteoclasts
- People who experience migraine headaches have lower levels of serum and tissue magnesium than those who do not.
I recently started taking 8000IU of Vitamin D per day, as I realise I hardly ever spend any time in the sun. This, along with the magnesium, seems to have made my emotional roller coaster and suicidal ideation completely evaporate.
I also regularly take zinc, C, lipoic acid.
I too am a vampire and very pale skinned so I spend practically no time in the sun. I think I'm going to have to make a concerted effort to change that once winter is done here.
Regarding the other supplements you are taking: Do you have any links to literature/studies that support taking more Magnesium, Zinc, vitamin C, and lipoic acid? I have terrible time sleeping because I take Suboxone which disrupts my sleep something awful, so if there's anything else I could take to mitigate that effect, I definitely want to try it.
Thanks for reminding me that I need to get my blood tested for D and Iron, on the recommendation of my pain doc.
I hope you continue to get beneficial results from those supplements, I'm very glad to hear the ideation being beaten down. You rock!
Peace and Joy for the New Year
Same with the others.
If you do this, it gets better because your body needs that. Your On/Off theory sounds nice and is easy to implement and works for you. But i think that will only work for you.
Now, the older I get, the more I need to force myself to relax 1-2 hours before bed -- meditation, massage, quiet reading, chill music, whatever it takes -- just to be able to fall asleep.
It's a big bummer, really. It's so easy to want to code into the night -- to make that final commit at 12:30 am and then hop into bed satisfied with real progress on a project. But the reality is, I'll be wide awake until 2:30 am thinking "oh if I refactor it that way!" "what if I did that as a next step" "did I account for that edge case? can't remember...".
So now I force myself to stop at 10, to give myself 2 hours to let all the thoughts fade away (and often put them in a notebook as they pop up during those 2 hours so I can let go of them), but it's frustrating.
For those who do not have time for meditation, you may find the second point called Mantram (repetition of holy name) useful:
At it's core, solution presented in the article -- apart from methods for dealing with anxiousness -- is to deprive oneself of sleep, but making sure to always wake up at the same time.
My issue is that I don't have any major problems when getting little sleep and I don't have anxiety. I just want to do more than there are hours of the day.
Several days of too little sleep do end up being detrimental, however, so I would really like to break this habit.
I would love to hear if anyone here knows of a way to deal with not wanting to go asleep, because there are other more interesting things to do. How do you convince yourself that you want to go to bed most of all, and not do anything else?
1. I did not recognize I was stressed, but I was - a lot. One day I bought a smartwatch that tracks stress levels (Garmin Vivosmart) and saw how high it was: 80-90/100 most days. That opened my eyes. You can be stressed and not know it.
2. I manage anxiety. First step was observing when it is there, what exactly it feels like. For me, it often manifests as jaw pain, body aches, tinnitus, tunnel vision, "narrow" thinking etc.. Then strategies to lower anxiety - quit smoking, meditation, more than anything building awareness of what it feels like for you so you can manage it - meditation helped with that.
3. Crystal clear goals, detailed goal-setting, and an acceptance of/commitment to slow and steady progress. Compulsions to read "interesting" stuff came from either a desire to escape the present moment, or idea that I was not reading/learning enough - which was a vague, unreachable goal that feels forever out of reach given the infinite amount of content on the web.
4. Feeds are designed to be addictive - stop it. Just don't do it for a few days and see how much clearer your mind is. And you will probably realize you don't "learn" anything from that kind of unstructured dopamine-seeking - it is more like watching TV all day than learning.
Basically i had forgotten what relaxation feels like, to the point where anxiety-driven thinking felt completely normal. It is not. Find ways to reduce anxiety even if you don't think you are anxious and stick with them - nagging thoughts, random pains, tunnel vision kind of thinking are all signs of anxiety. I'm still working on it, but this was a huge revelation to me - the idea that when you are anxious for long enough, you literally forget what calm feels like. Well actually the idea itself doesn't do much for me, but experiencing it.. that changes things.
This post is nice too (no affiliation at all):
This is a very insightful observation.
I have seen this in myself.
Reading about such a subject (rather than say, coding) works best. In fact I discovered this effect when I noticed there were a few papers I have still not managed to finish reading, even after several attempts (see for example ).
If all else fails, I put on a youtube video of a Noam Chomsky talk. That never fails. 
 Nienhuys-Cheng and de Wolf, The subsumption theorem in inductive logic programming: facts and fallacies.
 To clarify, I love Noam Chomsky and I consider him a great teacher to me, both in politics and science. It's the way he talks that gets me: he's so calm and his voice so smooth and soothing, that even when he's talking about very upsetting subjects like climate change or nuclear war, my mind just shuts down and I go to sleep like -this.
Other methods including enrolling other people into it. Your significant other either going to bed with you or keeping you accountable. Friends who will give real consequences for failure. A system that auto donates money to a charity that you hate or a personal enemy if you don't go to bed in time. Etc.
Where blue-blocker glasses 2-3 hrs before bed. This has a big impact for me.
Swanwick make prescription blue-blocker glasses which I havent seen anywhere else.
Try Uvex brand if you want something cheaper.
A teaspoon of magnesium powder in a glass of water (about an inch full) before bed
A hot shower about an hour before bed.
Nasal spray before bed to improve breathing.
(It took me forever to find that site when I was first looking. I don't Swanwick was making a prescription version then. Or maybe they were, but I didn't like the style.)
I recently bought this sleep tracking thing which works really well: https://www.beddit.com/ It's a thin strip that goes under your sheets and talks to your phone. It tracks heart rate and respiration and as far as I can tell it's quite accurate.
The things I've found most helpful are cognitive restructuring and the relaxation response. Both of which are recommended in this book: https://www.amazon.com/Say-Good-Night-Insomnia-Drug-Free/dp/...
Cognitive restructuring is part of the CBT stuff mentioned by the author. You catch yourself thinking thoughts like, "Oh shit I'm going to be so stupid tomorrow" and argue against them with thoughts like, "I've managed to do my job on no sleep before and I can do it again. Worrying won't help."
The relaxation response is very similar to mindfulness meditation: you systematically relax every muscle in your body while taking slow deep breaths that expand your belly. You do this for 15 minutes at some point in the middle of the day. You can also do mini versions of it for shorter sessions integrated into your regular activities. The point is to lower cortisol levels. If your cortisol levels get elevated during the day, they tend to still be high at night which makes it hard to sleep.
I'm familiar with CBT methods for treating other issues so I naturally tried to break the cycle by doing basically what Ilya's talking about. It worked well for me but I always reverted to my old ways when I think I'm "cured" only to have insomnia strike back.
I'm going to try to be regimented about it and see if this helps me long-term.
- If one's tired during the day it might be worth getting tested for sleep apnea. You can see if you're likely to have sleep apnea by answering the eight questions here:
- That's a really good point. I forgot that I was screened for it. I'll add that to the post.
1) Physiological. Things like low levels of magnesium, muscle pain, noise, temperature, light, circadian disruption, etc.
2) Psychological. Anything that leads to being anxious about not sleeping.
Both can manifest either as sleep onset insomnia (getting to sleep) or sleep maintenance insomnia (waking up in the night).
But here's the thing: sleep anxiety trumps all other causes of insomnia in terms of its power to prevent you going to sleep. Nobody ever felt a quiet nap coming on while running away from a lion.
Not everyone who suffers from insomnia also experiences sleep anxiety (at least at first). Those people are probably only one step from a cure because they can usually find a physiological cause (hence the number of comments here about magnesium or regular sleep/rise times, for example).
But grasping this fundamental point about sleep anxiety is extremely important. Regardless of whether you need more magnesium, less clocks in the bedroom, or to sleep naked etc., if you're anxious when you're trying to go to sleep then it's instantly game over.
So it follows that anything that increases anxiety about getting or maintaining sleep should be avoided, even if the underlying cause is something else. For example, CBT-I's prescription of getting out of bed after 15-20 minutes of wakefulness was counter-productive for me. It made me even more anxious about going to sleep after that. So too was sleep restriction. Waiting for what seemed like an eternity every night before being allowed to get into bed at 1:00am left me a nervous wreck. Better instead to go to bed at 11:00, stay in bed and work on something that alleviates any anxiety (I used mindfulness meditation).
So, if you suffer from sleep anxiety, prioritising strategies to reduce anxiety at night should be your number one aim. Everyone seems to find their own way in this. Mine was to follow the principles of ACT-I, but others may need different methods.
By the way, there is an online digital CBT-I course available called Sleepio.
One of the imho very interesting aspects of insomnia is the "self-perpetuating" feature. Can't sleep -> stress about not being able to sleep -> even more difficult to fall asleep. I think this is a common feature of several ailments. Another is not being able to get an erection for men or not being able to orgasm for women ("it doesn't work!" -> stress / adrenaline -> it works even less).
Would be interesting to find out what common "pattern breakers" are for short-circuiting the vicious cycle. Does anyone have experiences?
But what you do can also be seen as a form of meditation, since it is also an intentional taking-your-mind-off-things.
One of the amazing things about CBT is that instead of building up a tolerance, like you would with a sleep aid like Ambien, it gets more effective over time. It's self reinforcing, positive feedback loop.
My sleep isn't perfect, and I still take an Ambien every once in a while like on a red eye flight. However, if you're having trouble with sleep, I can't recommend CBT highly enough.
 - https://justgetflux.com
There was a time where F.lux was basically the only way to reduce blue light. BTW, F.lux has more advanced options than any of these OSes but it requires rooted device on Android/iOS. For macOS and Windows it will work out of the box.
This is in contrary to my belief. I have insomnia for many years and I thought one of the reason was because I never had a regular schedule for sleep. Over the years I can only sleep when I am dying to go to bed. Yet, most of the days, I just can't sleep.
Anyway, would definitely try out the advice
> don’t nap
I think the authors insomnia may have been more of a disturbed sleep schedule & I would consider “sufficient sleep but not in a single nightly 7ish hour block” to be different to insomnia.
Pedantic blah blah insomnia refers to irreversible awakenings not simply trouble falling asleep blah blah.
No worries now, only post-freudian communist distopian dreams thank you Žižek.
However, if I stay up without brushing my teeth (+ the other preps) then I cannot go to sleep right away when I'm tired. Because I still got errands to do.
When I read in the first situation I am already lying in bed horizontally. In the second situation I am sitting. Also, while you're reading, you should use an e-reader without much blue light.
If you have sleep issues go see a healthcare professional. Don't follow advice from random strangers on the Internet.
The circadian rhythm (aka sleep cycle) is regulated by a hormone called melatonin (not to be confused with melanin). It is produced by the pineal gland after exposure to light.
Light intensity from artificial light is usually low (unless you use luminotherapy lamps), leading to melatonin production issues, which affect sleep.
You can solve that by spending a bit more time outside. If you happen to live in a place with dark winters, get a luminotherapy lamp.
Other than that, there are other aspects that have to do with how tired you might feel... nutrition, hydration, exercise, etc. You can do all of that correctly while still having insomnia.
Please don't inject snide dismissals into HN threads. It reliably degrades discussion, and we're trying for better than that here.
Even if your dismissal were correct, it would still be beside the point. A blog post isn't a peer-reviewed journal paper, nor need it be. The idea that people should be punished for making their own investigations and sharing them runs deeply counter to the spirit of this site.
I just get very concerned when it comes to prescribing health advice.
And, I fully agree -- light is important. Maybe I'll add an addendum on that.
For anyone like the "Pseudoscience!..." commenter saying that melaton knowledge is, in general, sufficient alone to end said sleep problems -- that's just plain dismissive nonsense!
If you suffer insomnia this is where you should be starting with.
PS: I suffered insomnia, spent a lot of time working through it, and got medical advice.
Prefer residences and offices with natural light, or take a walk outside around noon (wear sunscreen). There you go...
Then, amount of papers doesn't necessarily translate into scientific rigor. Since research universities adopted a "publish or perish" policy there's a deluge of junk science.
update: corrected typo
FWIW, I live in California and spent four months on the beach prior to undergoing this regimen.
The perceived improvement could be due to other reasons rather than the therapy itself.
Usually you establish a relationship between the therapy and results through something like statistical significance but this was not the case.
Then, it is important to be responsible when offering health related advice to people. If you are not a healthcare professional, start saying:
1) Follow this advice at your own risk
2) I am not a healthcare professional this is a casual exploration of my sleep cycle.
I think this is more responsible than implying this followed some sort of scientific approach.
PS: rather than the ad-hominem try to add value to the discussion staying on topic.
1) ultimately came from a professional
2) was linked to a program with a bunch of literature
You risk your “Pseudoscience!” claim becoming unfalsifiable. What would it take to be, in your eyes, Not Pseudoscience? A direct link to a paper on this exact algorithm?
Which parts of the therapy are responsible for the results, all of them? part of them? When are the results favorable? Can any patient be treated in this way?...
You can just say "it worked for me". That's more acceptable.
You could have improved as a consequence of other factors rather than this "method".
If you actually did have the answers, you'd make a billion dollars solving insomnia and you won't have to worry about people like me trolling you on HN. You'd be too busy popping the corks of Cristal bottles onto the firm rear ends of women leftover from a rap video.
If you are interested in sleep, the 2017 Nobel prize in physiology or medicine was awarded to 3 researchers for their work in advancing the understanding of the circadian rhythm.
An article can be found here:
Melatonin is not explicitly mentioned there but you will find multiple occurrences of "hormone release". Melatonin is one of such hormones.
It's not so useful for people who wake up during the night, and it's not at all useful for people who wake early.
Your lack of understanding of insomnia is causing you to massively over-simplify, which is probably really fucking annoying to people who've lived with insomnia for years and gone through good quality medical and psychological treatments.