Anybody else suffer from the same? How are you switching off before you go to sleep?
Ask HN: Do you struggle to sleep after coding all day?
1–10 of 77 posts
Re: Ask HN: Do you struggle to sleep after coding all day?
#2I've been taking a melatonin supplement lately - it's helped. Cut back on your coffee intake if you drink coffee and try to work out for 10-20 minutes, even if it's just going for a walk or a light bike ride.
Re: Ask HN: Do you struggle to sleep after coding all day?
#3With that said, last year I was talking to my doctor about it at my annual physical. He suggested I exercise more often. So for about the last 6-7 months I have made a conscious effort that whenever I feel like I am starting to struggle I will go out for at least a 30 minute walk. I usually end up taking about 4-5 a day. There is definitely a direct correlation between the amount I walk and my productivity. And I am starting to sleep a whole lot better at night. Another thing that has helped me is I stopped drinking soda and now only drink water (or coffee).