Hacker News new | past | comments | ask | show | jobs | submit login
Algorithmic Solution to My Insomnia (sukhar.com)
253 points by csmajorfive on Dec 23, 2017 | hide | past | web | favorite | 79 comments

My entire life, but especially in graduate school, I've had horrible sleep. Both falling asleep, and staying asleep.

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.

> bed at 11pm, wake up at 630am

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.

I've found the same, more than 7.5 or less and I wake up either feeling groggy or tired.

I have seen multiple doctors, including sleep specialists, about my insomnia, and all they wanted to do is put me on prescription sleep meds for life. Those meds are addictive. I didn't want sleep meds. As a software engineer I was more interested in finding and fixing the underling problem -- there has to be one -- as opposed to the quick fixes the doctors were offering me. But that's not how doctors think, at least the ones I saw.

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.

Below is from nih.gov [1]

- 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.

[1] https://ods.od.nih.gov/factsheets/Magnesium-HealthProfession...

About three months ago, I started taking Magnesium Amino Acid Chelate 500mg, equivalent to elemental magnesium 100mg, at a dose of twelve capsules a day for three weeks, then dropping back to six capsules a day as a maintenance dose. Changed my life. I'm calmer, more emotionally resilient, I sleep better and longer and when I want. My interactions are others go much more how I'd like most of the time: that is, I feel I'm being a reasonable person.

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.

My SO and I both read about the study that suggested an RDA of 8,000IU of vitamin D. I've started on 10,000IU every other day and haven't noticed much of an effect yet.

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

With regard to magnesium, I'd recommend you start at the Wikipedia entry for Magnesium Deficiency,[1] and read about all the common forms of magnesium supplements: Magnesium chloride, oxide, gluconate, malate, orotate, glycinate, ascorbate and citrate are all used as oral magnesium supplements.

Same with the others.

1. https://en.wikipedia.org/wiki/Magnesium#Deficiency

Good if it works for you but i found over the years, countless theories about all kind of stuff.

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.

I am getting somewhere with this as well. My stomach doesn't like magnesium supplements so I rub a gel on my feet. It definitely does something (quite pleasant -- I almost get a slight high from it) and sometimes it knocks me right out but other times it seems to be counter productive. For me at least, there are more unknowns.

Have you tried magnesium amino acid chelate or magnesium citrate. I find I can take huge doses of these with no problems, but magnesium oxide ain't so great.

Mg is one of the best supplements out there. For sleep and general stress. You can literally feel more chill the next day.

Calcium supplements got rid of my insomnia.

I recently got difficulty to sleep. Gonna try and see if magnesium helps. Thanks

What is your intake schedule for Magnesium?

When I was younger, I'd be able to play intense video games and fall asleep right after.

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.

More than Insomnia I used to have sleep patterns where my mind wouldn't quiet down. After I started practising meditation, specifically the 8 point "Passage Meditation", I started experiencing a much better quality of sleep. http://bmcm.org/

For those who do not have time for meditation, you may find the second point called Mantram (repetition of holy name) useful: https://www.bmcm.org/learn/mantram/

I have a form of insomnia where I just can't convince myself that I should just go to sleep and stop checking YouTube, hackernews, Wikipedia, various interesting articles.

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?

I had (have) a similar problem. For me it was a few things:

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):


>Basically i had forgotten what relaxation feels like, to the point where anxiety-driven thinking felt completely normal.

This is a very insightful observation.

I have seen this in myself.

Thanks. If you see this - I saw you mentioned flexible working hours in your job and would really like to talk about that - can I get in touch with you over email? My email is in profile.

I've had the same problem for a very long time. The solution I found was to choose a subject that I am really interested in and that's really useful to study, but that severely taxes my mental faculties. I then dedicate the last few hours of the day to studying it. The intense mental effort almost never fails to put me to sleep within a very short time after beginning.

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 [1]).

If all else fails, I put on a youtube video of a Noam Chomsky talk. That never fails. [2]


[1] Nienhuys-Cheng and de Wolf, The subsumption theorem in inductive logic programming: facts and fallacies.


[2] 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.

For me. It is just habit. You go to bed at a certain time. And you reward yourself for doing it. Basically any habit is formed by the set of trigger, action, reward. The trigger is something that happens, an alarm, seeing a time on the clock etc. The action, get ready and go to bed. The reward needs to release dopamine. That can be as easy as just congratulating yourself.

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.

I would recommend finding some evening activities that you enjoy but are less stimulating. For example, I find it much easier to drift into sleepiness when I'm watching Netflix on the couch rather than sitting upright at my computer actively engaging in a quest for more information.

Had the same problem, realizing longer hours don't make you more productive helped.

Here's what works for me:-

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.

I got mine from here:


(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.)

Any idea how this compares to Lenscrafter's Blue IQ lenses? Also what is this nasal spray?

I also have pretty serious stress induced insomnia like the author describes. This sleep deprivation stuff didn't really help me. In fact, I wonder how much it really helped the author. I know I've tried various strategies and proudly proclaimed myself cured on a number of occasions only to have the sleeplessness return the next time shit hit the fan.

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 naturally stumbled upon this method but it's nice to have it formalized. At first I noticed how insomnia fed on itself and noticed how I start to question my ability to fall asleep and as the night comes around I start feeling anxious.

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.

- I wonder what are the best ways to treat early morning awakening. I guess the sleep deprivation technique mentioned in the article could be a possible solution. Though it wouldn't be very helpful if it didn't last 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: http://www.stopbang.ca/osa/screening.php

- Do you mean how to wake up best? If so, I can share some techniques I learned.

- That's a really good point. I forgot that I was screened for it. I'll add that to the post.

I meant how to avoid waking up too early. (Some techniques seem more geared at helping people fall asleep.)

Ah, yeah, I found the CBT-i regimen naturally helped with that.

Like many people here, I've been through a long period of suffering from insomnia and tried a large number of approaches to cure it. From what I can tell, there are essentially two main causes, which can be interrelated:

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.


I suffered from insomnia as a child and it peaked when I hit 12-14 yo. My pediatrician told me to do EXACTLY as you suggest, namely "If you’re in bed for more than 20 minutes and haven’t fallen asleep yet, get out and do something else.". Basically, don't use your bed as the place to TRY to sleep. Only sleep there. This worked like a charm for me and I haven't had sleep issues since.

I have had also wonderful results from CBT. However, the 'sleep restriction' part requires a lot of willpower and determination and was no easy feat for me to hold on. However, after restricting my time in bed to 5 hours for 2 weeks, I had definitely no problem getting to ZZZland after crashing in bed at midnight.

By the way, there is an online digital CBT-I course available called Sleepio.

What really helps me is to keep my mind occupied when lying in bed at night. In my case, I try to solve P vs NP. That way, I actually enjoy the "sleepless" time, and am not stressed about not being able to sleep.

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?

I'd recommend trying meditation, since it is simply training your mind to introspect so you may recognize these moments of stress and let them go with minimal effort.

But what you do can also be seen as a form of meditation, since it is also an intentional taking-your-mind-off-things.

Cognitive behavioral therapy for insomnia was the biggest improvement I have ever made to my quality of life. Like OP, I struggled with insomnia my entire adult life. I didn't realize that sleep was a thing that you could see a doctor about. I was sleeping about 4-6 hours per night before CBT and 6-8 hours afterward.

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.

Semi related, I had occasional trouble sleeping at the designated time (I would sleep an appropriate amount, but but not when I wanted to.) After reading gwern’s page on melatonin I tried it since it is easy and low risk, and now I can fall asleep consistently when I want to, by taking melatonin X minutes before.


I struggled to get to sleep for years until I realized I could doze off more easily when other people were around making noise. Now I listen to audiobooks and podcasts and fall asleep within 5-10 minutes most nights. Other speech seems to shut down my internal monologue and overly sensitive threat detection circuits :-D Only mentioning in case this clicks with someone else.

This is something I discovered awhile ago as well, and it definitely works. Some people call this "sleep restriction therapy". It's not well known, unfortunately, and I agree with the OP: a lot of the advice you find are just so hackneyed.

Why does the "make your target time earlier" branch have the upper limit of 0.95? There's already a "stay the course" region in [0.8, 0.9], shouldn't you move your sleep time earlier for anything above 0.9?

Good question. In my experience there is a danger of over-optimizing, trying to get too much sleep, and then regressing again. Some of the literature agrees with you though.

If you have trouble with sleeping and are using computer late at night - remember to use flux[1]. It really helps from my experience.

[1] - https://justgetflux.com

Windows 10 now also has night light setting specifically to reduce blue light emitted from the screen and better sleep! With just press of a button it would automatically go to "night light" mode from sunset to sunrise. Very cool. I think iOS also has similar setting. Plus there are lot of "blue light" blocking screen protectors out there but most of them are from China and hard to tell which one really works.

Nowadays, latest versions of Android have this native (called LiveDisplay in LineageOS), macOS/iOS have this native (called Night Shift in macOS). Windows 10 have this native (as you already mentioned called Night Light). Windows was last btw.

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.

To the author - can you please share the name of the researcher who did the CBT-i program? It would help me and many others. Email me (link in profile) if you cannot post it here. Thanks.

Melatonin and Vitamin D. In modern day life, our bodies do not get enough exposure to sunlight to produce D and Melatonin, which the brain and body need to sleep well.

> Never get in bed and try to sleep because “it’s bedtime”. Only get in bed when you are dying to go to bed

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


Yes, good.

> 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, I wasn't napping prior. I did get an urge to nap when the CBT-i started.

Rad. It never occurred to me that some people could nap in the daytime after a poor nights sleep and then struggle to get to sleep and not see the connection. Glad to see I’m wrong as h*ck.

To cure my insomnia I look for >1h long philosophy talks on YouTube, set the video fullscreen, turn the phone face down and let my mind drift into the coziest of sleep.

No worries now, only post-freudian communist distopian dreams thank you Žižek.

"Never get in bed and try to sleep because “it’s bedtime”. Only get in bed when you are dying to go to bed" This is one important thing I've learned. I try to read books until I feel sleepy and then go to bed.

If I brush my teeth (+ all other things in preparation such as locking the door, feeding the cats, etc) and go to bed, then read (without disturbing my partner) then I am ready to fall asleep as soon as I feel tired.

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.

sounds like you are calculating & shifting your "dim light melatonin onset" (DLMO)


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.

> Pseudoscience!

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.

Sorry about that.

I just get very concerned when it comes to prescribing health advice.

I'm not sure what part you found to be pseudoscience. This technique was prescribed to me by a healthcare professional and can be found in medical journals.

And, I fully agree -- light is important. Maybe I'll add an addendum on that.

Helpful but not really necessary. For most anyone who's suffered the level of sleep difficulties described here, them having knowledge of melatonin and its effects can reasonably be assumed.

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!

Melatonin has a strong influence on the circadian rhythm regulation and is nowhere to be found in the article.

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

Thanks for the feedback. I'll add that to the "common wisdom" invariants to clarify that's an assumed prerequisite.

FWIW, I live in California and spent four months on the beach prior to undergoing this regimen.

This algorithmic method is a useful addition to the insomniac's toolkit. Please don't berate methodologies based on logic and then describe anecdotes with poor english (wtf is "singlest"?).

Or placebo effect, we don't know. It's self experimentation, there's no control group, no accompanying data, etc.

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.

Definitely agree that people should be responsible when offering health advice - but if you’re striking down advice that:

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?

Placebo effect working for sleep disorders? Kind of reminds me of trying to rigorously test psychoactive drugs.

I think by definition insomnia implies a sleep problem that goes beyond trivial solutions like getting a little more sunlight. There are plenty of us who have trouble sleeping regardless of sunlight exposure, exercise and substance intake. And we can tell you it's overwhelmingly a mental issue. I also happened to have arrived a similar method as what the OP described, and it works.

How did you determine this method works? Does it yield consistent results?

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".

Do you think this form of communication makes HN a better place?

"don't trust advice from strangers" followed up with several paragraphs worth of advice from someone I don't know

Bullshit. None of that worked for me. I'm sure lots of it works for other people, but rest assured you don't have all the answers about insomnia.

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.

Sure, probably I oversimplified it, but melatonin does play a more central role in sleep than some of the factors mentioned in the article.

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.

Melatonin is useful for people who can't get to sleep.

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.

melatonin is one of those "low hanging fruit" solutions people always give for insomnia. And 99% of the time, it never works. At least for me. If only it was that easy.

Amen, brother or sister

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact