Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Magnesium supplementation solved my sleep issues.

I have seen many doctors, including sleep specialists, regarding insomnia. They all pointed to one source as the reason for the sleep issues: stress. And they all wanted to put me on prescription sleeping pills. I said no to that. Sleeping pills can cause dependence, and they often treat the symptom rather than the underlying cause. As a software developer, I am used to finding and fixing the underlying problem instead of relying on the quick fixes these doctors were offering me.

After much research, I figured out what I believe was the underlying problem, and the fix for it. The underlying problem was magnesium deficiency. As a software developer, I spend much of the day doing mentally demanding work. This is the kind of stress the doctors were talking about. Stress can increase the body's demand for magnesium and may contribute to low magnesium levels.

The cells in our body depend on minerals such as calcium and magnesium for normal function. In muscle and nerve cells, calcium helps switch the cell into an active state, while magnesium helps keep that activation under control and supports the return to a resting state. When you are low on magnesium, your muscles may remain tense and your nervous system may have a harder time settling down. That can contribute to muscle stiffness and difficulty sleeping.

The solution, in my case, was magnesium supplements. They fixed my muscle stiffness issues and my sleep issues. A special form of magnesium called magnesium L-threonate may be especially helpful for the brain because it appears to raise brain magnesium levels more effectively than some other forms.



> Sleeping pills can cause dependence, and they often treat the symptom rather than the underlying cause.

I found gwern's take on Melatonin interesting: https://gwern.net/melatonin

A small excerpt:

> One might object that they do not wish to tamper with their natural sleep, even if melatonin is a normally-secreted hormone.

> Sad to say, I would point out to such readers that they are already profoundly tampering with their natural sleep cycle, and indeed, all of Western civilization is tampering with it; most of my readers do not even sleep multiple times during the day, as ‘Nature intends’ and as humans have usually slept through history, but rather in a single 7–9 hour long block.

> [...]

> Finally, there are multiple lines of research suggesting chronic sleep deprivation is prevalent among young adults (including historical comparisons). It is striking that unemployed adults sleep a full hour longer than the employed , and that when normal adults are placed in settings without artificial light like camping or without any time indicators, they sleep longer than before - exactly as if they were sleep deprived.


This is a very important paragraph from quern's article

> There are few to no side-effects to melatonin use in adults (there is uncertainty about the risks & benefits in children & adolescents28), and it is not addictive or habit-forming like caffeine is. The usual dose for a night is 0.5-3 mg and I take 1.5mg [29]; my dose is highly likely to be too high. High doses may well be responsible for why some people try melatonin and report that it does nothing or hurts them, since in one study, the best dose for old people was 10x smaller (0.1mg or 0.3mg) and for one blind person, 0.5mg [30 31 32] . Zhdanova et al 1996 found 0.3mg & 1.0mg to affect sleep onset similarly. A study of delayed-release melatonin found with their high dose of 4mg (but not 0.4mg) elevated melatonin levels 10 hours after bedtime ( Gooneratne et al 2011) - potentially interfering with waking time.

It is difficult to find doses as small as 1mg sublingual (dissolve under the tongue) in my area. Everyone is trying to sell you 5-30mg chewables. And, I expect everyone is buying them under the assumption that more is better. But, here it explicitly is not.

The way melatonin works well for me is to wait until I'm already settled into bed and should be asleep, but I'm not. Do a couple body scans to relax for real. Try to think about something mindless. Then if I'm still awake, pop 1mg under my tongue. I'll usually wake in the morning with half of it drooled on my pillow :P


From your description it may be acting as a placebo -- the act of putting the pill into your mouth is what tells your subconscious to activate a sleep cycle.


Placebos are actually very effective for improving sleep

If you call it a ritual instead of a placebo it suddenly sounds much more credible.

But a ritual sounds like something they practiced in the Middle Ages. Placebo sounds modern and scientific.

Don’t jinx it


placebo works whether you believe or not and even if you know.

They are very powerful.


It’s less than if you don’t know though, right?

I've had the same problem finding low-dose melatonin in brick-and-mortar stores, but Natrol sells a 1mg dissolving tablet on Amazon. If I need a sleep aid, I break it in half for a ~0.5mg dose, chew it with my front teeth, then hold it under my tongue for a bit before swallowing what's left.

It usually takes 15-30 minutes before I get noticeably drowsy, but I feel no more groggy the next day than if I slept sober.


For low dose melatonin, try liquid melatonin. Around here Sprouts carries it, but you gotta look a bit to find it. The bottle says 30 drop equal 3mg. So you can take small doses easily, and it absorbs under your tongue pretty quickly.

Yes. I agree. Liquid melatonin is the way to go for micro dosing. I also have good experiences with micro doses of 0.1-0.2 mg when waking up too early and having difficulties of falling asleep again. Taking a full 1 mg leaves after 3 or 4 am you very croggy in the morning.

most bricke and mortar should have at least 1mg tablets, and you can break those in half. or break a 3mg into 3rds. not perfect but should work.

Natrol makes a 1mg gummy and Vitafusion has a peach flavored 1.5mg gummy (sold as “3mg” but the dose is “two gummies.” My kids use these. I get them on Amazon.


Bulletproof has 0.3mg capsules, but it's a pricier brand. On the other hand, I'm not sure which other brands actually have the dose they say they do.

Way too high in my experience. Can leave you croggy and dependent. Micro dosing using drops is more effective for me without feeling groggy in the morning. Anything above 1mg is way above the natural melatonin level of our body.

Interesting. Can you share any research tips that helped you arrive at that conclusion? I don't want to overdo it. Dosages in mainstream products are often even higher than the 1.5 so it's obviously easy to go way, way too high if what you're saying is true.

It's a bit harder to find, but I've had a good experience with liquid melatonin. Each drop contains like 0.1mg, so it's easy to dial in the small dose that you need.

It’s wild to me you’re able to shut your brain down that fast!

Long-term use of high dosage (5-10 mg) of melatonin gave me painful stiff neck and shoulders and muscle spasm.

Go get children's melatonin gummies and cut it in half. Problem solved.

fyi, Whole Foods sells liquid melatonin. bottle says 30 drops contains 3mg so I only take a couple drops at night and it does the trick for me.

it's easy to find 0.3mg melatonin online.


The evidence that humans would naturally be designed to sleep “multiple times a day” is quite mixed. “Multiple” does a lot of heavy lifting here, when basically most evidence points to two batches, following either of these patterns:

- a long uninterrupted night cycle and a short (20-60 mins) afternoon nap. Around 2pm. - a night cycle split into two halves. With a 1-2h break (maybe up to 3h) starting around midnight to 2am.

The former is still very common, and imho stretching the definition of multiple cycles. The latter is more historical (more common when there are long winter nights and no electricity).

Also making it a “Western” problem is kinda weird? There are other cultures where single cycle sleep has existed. Even hunter-gatherer groups with little to no contact with the west. And alternatively afternoon naps are still quite common is some western areas. I guess the main thing that prevent it would be the classic work day schedule.


An article exploring research and citations of "first sleep" and "second sleep"

https://www.patheos.com/blogs/geneveith/2013/08/first-sleep-...


Doesn't multiple mean more than one?


Everyone is different so I'm not suggesting this as a general cure-all, however I'd like to relate my own personal anecdotal experience.

I've always had insomnia since I was a kid and I just chalked it up to "being a night owl." As a teenager, I mostly solved this by living in a permanent fog during the week and "catching up" by sleeping in on the weekend. As an adult, I was suffering greatly from chronic sleep deprivation because adults (mostly) don't have much control over when they can wake up to start the day.

Around 10 years ago, I started taking 5mg melatonin. It's going to sound like I'm overselling it, but it changed my life. It _very reliably_ makes me sleepy 1-2 hours after I take it. If I forget to take it, I am fully awake until the wee hours of the morning. Is it important to note that (for me), after I take it, I have to engage in some passive activity like (calm, non-shouty) YouTube repair videos or reading. Also, the "window of sleepiness" is at most about 30 minutes and if I decide to power through it, I will come out the other side fully awake again. Melatonin does not "force" me to sleep, only highly encourages it.

I was skeptical of melatonin for the longest time. Generally, I rarely see much if any positive effect from supplements. But (for me!) this stuff really works. If anyone reading this is on the fence, I highly recommend giving it a try. (With the acknowledgement that it takes about a week to get into a solid sleep schedule if yours is currently disorganized.)


Melatonin works well to help me get to sleep, but it doesn't keep me asleep. My issue is waking multiple times in the night, mostly because I'm just uncomfortable, but my brain will immediately be thinking of some work or personal task and spinning. I solve this by putting on an audiobook each time, and that focuses my attention, and I'm asleep again in 5 minutes. So, I have developed "solutions" to my sleep problems, but they don't really fix the underlying issues.

Also, I don't take melatonin often, only when I seem to need to reset my sleep cycle, and I only take about 200-300 micrograms.

Why do you take so much? 5mg is a lot, according to the studies.


Have you been checked for sleep apnea? If you keep waking up throughout the night, it's a good idea to get checked.

What exactly is sleep apnea?

When your tongue relaxes during sleep, it can fall back into the throat and block your airway. This triggers the breathing pauses, gasping, and loud snoring characteristic of obstructive sleep apnea

Thanks. I haven't been checked. People always mention this though, so maybe it's common. But some people are just bad sleepers even without sleep apnea?

I’m not saying it will work for you, but it may be worth trying GABA or 5-HTP to help you stay asleep. As a chronic insomniac of many years, I take both and not melatonin. Sometimes if my sleep schedule gets bad enough I’ll take 25mg of diphenhydramine HCL to get to sleep, but it gives me strange dreams and makes me a little foggy the next morning.

I honestly didn't know you could buy less than 1mg.

I started with 5mg arbitrarily because that seemed to be the most common dosage sold at the time. I think about lowering the dosage sometimes but at the end of the day, I know 5mg works well for me. I don't notice any side effects, and it's not any cheaper.

I also started with the special "slow release" formulas but couldn't tell any difference from the normal generic stuff.


My family doctor in Italy strongly recommended taking 0.3-0.5mg of melatonin maximum saying that more won't have a good effect and risks having bad effects such as drowsiness the whole day after waking up. And yes, in Italy most melatonin you'll find in pharmacies is <=1mg.

The Netherlands sells 500x0.1mg pills, so you can always get the perfect dose.

I take melatonin to sleep on a redeye, but otherwise don't use it. I find the effect is similar to taking a weed edible to fall asleep— basically, my wearable registers a lengthy period of deep sleep but instead of waking up feeling refreshed and ready for action, I'm groggy and fog-headed for several hours, or dependent on coffee to reverse the lingering effects.

As someone who has never been a regular coffee consumer, I really didn't want to end up with the dual dependence of melatonin at night and then caffeine in the morning.

This thread is stimulating me to want to get my magnesium checked, but barring that I've found the most effective sleep interventions are the basic ones: get some exercise earlier in the day, and don't do screens for the last few hours before bed.


This sounds like you may be taking a very high dose. What dose do you take?

The tablets in my OTC jar are 10mg, and they're pretty small already, not easily divisible, and certainly not to 1/100th of a dose as the sibling comment is suggesting. This is an interesting suggestion though, maybe I'll try just licking one some night and see if that has a noticeable positive effect sans the downsides.

Pretty much all the melatonin in physical stores is hilariously overdosed, yes. If you're in the U.S., you'll have to look for products from specialty supplement brands. I take a tiny 300mcg capsule.

This. Try with smaller doses starting from 0.1 mg (liquids are best for this) and work your way upwards to reach the optimal dosage. Tablets are often overdosed which leaves you drowsy in the morning.

"and don't do screens for the last few hours before bed" because that will help you fall asleep more quickly? or because that will help you sleep later in the morning 6 or 7 hours later? People never seem to mention that key aspect.


For me most things I do on a screen are fairly mentally stimulating (like video games), and even the ones that aren't (like watching a movie) inhibit the feeling of sleepiness I get when I abstain. So, it's better for falling asleep quickly.


I believe it's much to do with blue light emitted by screens:

https://pmc.ncbi.nlm.nih.gov/articles/PMC9424753/


I had heard that that wasn't as much of an effect as some people think - https://www.bbc.com/future/article/20260407-the-blue-light-f...

or rather, that its less about blue light specifically, and more about activity and bright light in general - the times where we are active are shifted later, and a profound lack of exposure to bright light during the day is the issue. Even with the massive amount of screen time the average person gets in a day, that much light adds up to less than a single minute of the equivalent of sunlight.

Probably the best thing you can do is go outside as soon as you can from when you wake up, and stay outside as long as you can. Failing that, get some good BRIGHT sunlight lamps. way brighter than you think could possibly be necassary


The comment above just said “sleeping pills” which is ambiguous. Melatonin is an OTC supplement. True “sleeping pills” are usually controlled substances and few doctors would prescribe them as first-line options for a patient who shows up with first time complaints of sleep problems. They won’t be prescribed long-term either. The part of the post that says doctors (plural) tried to prescribe the pills makes me think it’s not traditional sleeping pills, because in this environment you would be unlikely to find one doctor willing to prescribe scheduled sleeping pills long term at all, let alone multiple doctors pushing them.

The usual suggestions from doctors for first line treatment are more mild medications that have drowsiness as a side effect, prescribed at low dose. I would actually prefer many of these low dose options over some of the high dose melatonin supplements. Melatonin is a hormone and taking it can throw off natural production


Lots of people take diphenhydramine products as sleeping pills and they are advertised as such OTC in the US. Long term Diphenhydramine use is associated with many negative health outcomes and despite the warning labels many people become dependent on them.


The parent post was talking about doctor prescribed medications.

The reason diphenhydramine Is associated with a slight increase in dementia risk is the anticholinergic properties. This risk increase is from correlational studies on other medications with anticholinergic medicines being taken for many years by elderly people, so the risk of taking Benadryl occasionally is low to none.

The prescription alternatives like doxepin have the same antihistamine properties without the anticholinergic properties when used at the prescribed dose.

This is an example where people can get themselves into the wrong outcome by assuming anything their doctor prescribes is a last resort quick fix, but anything they can source by themself is safer and superior.


Yes - I saw a very interesting video the other day that educated me a lot on Benadryl - apparently it has a lot of side effects, can cause dementia, and is probably best avoided.


Occasional Benadryl is fine. The dementia risk is from correlations found in other medicines that share some of the same properties, when taken for many years.

It’s not a good idea to take Benadryl for many years, but occasional use or even for months while going through a difficult period isn’t going to cause dementia.


The dementia risk is from disrupting the circadian rhythm and suppressing the REM phases.

It's worth keeping in mind that melatonin is also prescription-only in many countries e.g. UK, Canada, Japan, Australia.


OTC in canada


My bad, apparently it's prescription-only for children in particular.

> True “sleeping pills” are usually controlled substances and few doctors would prescribe them as first-line options for a patient who shows up with first time complaints of sleep problems. They won’t be prescribed long-term either.

Modern orexin antagonist sleep medications are not addictive and can be taken long-term.


Trazodone is also not addictive and doesn't have bad side effects afaik.

Trazodone does little to improve objective sleep quality [0] when used off-label for treating insomnia. From my n=1 experience it it useful as an adjunct to an orexin antagonist in special cases when I stressed/annoyed out of my mind by work or something else, but not as a primary "sleeping pill".

[0] https://pubmed.ncbi.nlm.nih.gov/29680424/


In Austria a lot of times as second line ( after melatonin etc ) quetiapine is prescribed for its off label effects.

> They won’t be prescribed long-term either.

Tramadol is routinely prescribed long term where I live. I know someone with a massive bottle good for something like 6 to 12 months of daily use. (I don't know if that's a good thing but it is certainly a thing.)


Tramadol is a pain medication, not a sleep medication.

It has opioid effects and can cause drowsiness but would never be prescribed for sleep.

It’s also typically a controlled substance. I don’t know where you live but I’d be surprised if anyone was handed a 12 month supply in a bottle.


There are a wild amount of countries where it’s not treated like the opioid that it is, for what it’s worth. Mostly not western ones, though.

You sure you don’t mean trazodone?

I agree with Gwern in that I think for the vast majority of people, short-term melatonin supplementation is useful and can cause little harm, and it is extremely safe as far as supplements go.

But I don't think it does anyone any favors to oversell the idea that it has "few" or "no" side effects -- it has mild side effects, most commonly reported in the literature are daytime fatigue, headaches and GI symptoms, and also nightmares. Mild doesn't mean it isn't a nonstarter for some people.

It's also important to remember that there are major gaps in what we know about melatonin; notably the effects of chronic supplementation are not well-studied, but earlier final awakening has been documented and this is quite commonly reported in anecdata -- I can contribute a datapoint there, as can most people in my circles who have used it.

To be clear, melatonin is great and useful, but as someone with a rare lifelong chronic sleep disorder who is intimately familiar with this substance, I think it's most useful when we're clear on what we know, what we don't know, and what actually are the limitations on a substance.

Just because downing a bottle of it probably won't cause systemic organ failure or otherwise any kind of medical emergency in most people doesn't mean there aren't tradeoffs to consider when using it, especially if you are sleep-challenged


The problem with that take is that the evidence for melatonin is quite poor outside of jet-lag and certain more serious sleep disorders, and there can be unexpected effects elsewhere in the body when supplementing hormones, e.g. increased rates of depression for melatonin in particular.


This. Melatonin is a hormone. You should always be extra careful when dealing with any kind of hormone as it might affect your own body's regulations.


yeah. that’s been my experience as well. my doctor gave me the impression that melatonin helps set the cycle but magnesium glycinate is what calms the body.


This. And maybe anecdotal, but my experience of people who have used melatonin is that they sleep very deeply, but for a shorter amount of time. But likely they will wake up after around 6/7 hours sleep, rather than the recommended 8 hours of sleep. And once woken up, it's very hard to go back to sleep.


>rather than the recommended 8 hours of sleep

for people getting 7 hours of sleep you're good. Improve your sleep hygiene, ok, but artificial interventions to get 8 may not be worth it for you.


7 is enough for a lot of adults. especially 7 hours of quality sleep. After seeing a sleep doctor I realized that stressing out about not getting exactly 8 hours each night was part of my problem! I did a lot of experimentation to find my optimal hours and it was not quite 8. Trying to force extra hours doesn't really work.


AFAIK 7-9 hours is the commonly used range, anything less than 7 hours or anything more than 9 can have detrimental effects on how well rested you feel after waking up. Where did you get the notion that adults need exactly 8 hours on the dot?


It really is variable. My number is closer to 9, so even nights I get my "good 8 hours" I still end up with a sleep deficit by the end of the week.

That's what my wife and I sleep for, 7 hours. 8 and we wake up with a headache.


I specifically take a timed release melatonin, really improved my sleep. Otherwise I did have inconsistent sleep on regular melatonin.


>and that when normal adults are placed in settings without artificial light like camping or without any time indicators, they sleep longer than before - exactly as if they were sleep deprived.

I’ve been on a few multi-year camping trips, and it never stops amazing me that I feel like a different person after six months or so of sleeping with the sun. 10+ hours of sleep for many months is incredible.


I find it impossible not to reflect on my personal experience whenever this comes up. I spend 8+ hours a day on a computer, looking at screens. Probably more. I am looking at a screen literally 10 minutes before falling asleep (watching stuff on my iPad).

I can easily sleep 8+ hours. Today slept 10.5.

I'm either not convinced screens are an issue, or they simply are not an issue for me personally, but if thats true -- WHY?


Eh, I was prescribed 2mg of slow-release melatonin to help with insomnia (baby-related).

Man, were these the worst nights of my life! I’d get 2-3 hours of shut-eye and then be FULLY awake. Ready to go, couldn’t sleep the rest of the night. I was dead tired by day 7 and gave up.

Tried 0.3mg. Tried 5mg. Nope. There’s some evidence that melatonin can mess you up if you’re sensitive to cortisol/have too much of it. I’m not touching it again. No side effects? Sure.

N=1, but if it’s not working for you, don’t push it. My doctor instead prescribed a bit of therapy (CBT-i) and my sleep went back to normal after a couple of sessions.


Not sure why I would trust the opinions of this random person?

100 the same.

I tried magnesium before but didn’t see any effects after a week so threw in the towel. Then I read a comment by someone here that had the exact same symptoms as me (brain wouldn’t turn off), explained the underlying cause, suggested L-threonate, and explained that it’s a long-term deficiency and might take some time to build up sufficient reserves.

I have had insomnia my entire life, since I was a child. I would go to bed around midnight and fall asleep at 3am, if I was lucky. I simply could not get my brain to disengage.

Within a month of supplementation, I thought I noticed a bit of improvement. By two months, my insomnia was gone. Not better. Gone. I fall asleep within minutes now.


But how come you have magnesium deficiency in the first place, what are you not eating? People who need magnesium supplements still absorb magnesium, so the problem isn't absorption must be consumption.

Fresh fruit and veg, nuts, and other fresh things. Thing is, modern farming and distribution practices have negatively affected the magnesium content. Drinking water also used to naturally contain more minerals but in many places is removed to cause less issues with plumbing and because “hard water” also makes it harder for soap to lather. Absorption also depends on vitamin D, so if you’re low in D, you won’t absorb as much magnesium. I have also read that magnesium is required by the body to make GABA and melatonin; supplements other commenters are mentioning.

Magnesium is a great supplement in general. You can definitely have too much in your system and that is undesirable, but a bit before bed time along with 1-3mcg of melatonin work well for me. It is nice after workouts. I use magnesium glycinate in powder form, which is more bioavailable than some forms as well.

I also find sauna before bed is good. I have a bed chiller so I can crank up the sauna before bed and not sweat a lot. Generally if I sauna and take the aforementioned supplements I sleep well. Exercise also seems to help me out a lot. If I exercise during the day, and a 4-5 times that week in general, I tend to sleep well.


Mg or melatonin have 0 effects on me, Mg helps if I over-exercise but thats for muscles regeneration.

I dont have problems normally, just cant sleep in high altitude, 3000m is already showing mild effects. Guess what, I do/did quite a bit of mountaineering, its easy to get above 5000m in himalayas, highest I've been in tent attempting to sleep before summit push was 6000m on Aconcagua. Tried both Mg and melatonin up there over multiple nights, 0 improvements. I had highest O2 blood level measured in 5500m by doctor (mandatory there) from whole group.

Physical effort makes better sleep for literally everybody, thats age old knowledge and I havent met a single exception yet.


> Mg or melatonin have 0 effects on me

> I dont have problems normally

A lot of things don't have effects on people that don't have the problems the thing is trying to solve.


I meant during higher altitude adventures, as rest of my post explains in detail. Did you get to that part?


I wonder if that is an adaptation time problem? It takes about a month for the body to fully adjust. I live at 1500m elevation in the Denver area of Colorado, but I do recall feeling more restless during sleep at elevation before I lived here.


Your report matches my experience as well!

Funny how it's basically do all the things you're supposed to do - exercise, diet, stress management - then sleep is then easier.


Sauna and then a lukewarm shower to cool down is also great.

For me glycine helps amazingly. It's an amino acid that the brain needs during sleep. I take about 5 grams in water about an hour before I go to sleep. I'm not sure how much the glycinate in magnesium glycinate has the same effect.

Oddly, it has the opposite effect as sleeping pills on me, it doesn't make me sleep more but I'm more rested when I wake up. It even happened a few times that I only slept 5 hours but still could focus well at work and bike intensively for an hour in the evening, without glycine that was impossible.

At 20 euro/kg I think I'll take it for the rest of my life, and it probably will add a few years to my life.


Yep, I've been taking glycine and magnesium for years. I am not as consistent as I should be but it makes a big difference when I use them.


Same here. Only thing that’s ever worked.

> As a software developer, I am used to finding and fixing the underlying problem instead of relying on the quick fixes these doctors were offering me.

I'm skeptical that avoidance of "relying on the quick fixes" generalizes to software developers as a whole :)


To be fair I care way more about the long term sustainability of my body than all the software I write regardless of how business critical or interesting it is. Or hardware for that matter, the "temporarily" zip tied CPU cooler fan says hi lol

> Magnesium supplementation solved my sleep issues.

Which type, if you don't mind my asking? And how long did it take before you felt the benefits? I took it for a month once (forget which type) an hour before bed and nothing changed.


I've tried both Magnesium Glyconate and Magnesium L-Threonate and both have helped my sleep, Magnesium Citrate did very little. Which makes sense, the latter is known to not be absorbed very well.

I've not noticed any significant difference between the other two.


Magnesium citrate works well for constipation, IME.


Yeah, magnesium citrate is used medically as a laxative. Because it is poorly absorbed, it draws water into the stool osmotically, making it softer. (But that also draws water out of the body and can be dehydrating.)


Magnesium Glycinate has been a game changer. My legs used to be tense to the point of cramping at night, and they’re now relaxed, enabling better sleep. I also use L-theanine as an additional supplement for a long duration deep sleep, and think it helps.

Interesting about the legs. I wake up with that in the middle of the night and have trouble falling back asleep because of it. Heck, if MC just took care of that, I'd be happy. Thanks for your input!

What I've found to fix leg cramping is skin rolling my legs (ideally every 6 months but takes maybe a couple of years to fully undo the effect). Lightly pinch some skin between your thumb and two fingers and walk it forward with the two fingers. If you need it it will feel "crunchy" in some spots rather than smooth. Ideally cover the full area at least twice at 90 degree angles (not necessarily all on one day and doesn't need to be perfect coverage, more is helpful if it still feels "crunchy"). Warning: while only mildly painful for me when doing it, after sleeping I wake up with quite sore legs which lasts two full days. Doing it every 6 months or so avoids this and is also when I start to occasionally get cramping again.

Suffered for a decade till I discovered this. I’d reached a point where I was actively skeptical about anything working, till this worked out. Good luck!

Magnesium Glycinate worked well for me, take it an hour before bed or so. L-Threonate is too expensive, citrate gave me diarrhea.

Much more deep sleep with Glycinate, some folks don’t like it because they feel too groggy after waking.


I find that Magnesium Glycinate works well for me. Magnesium Taurate also works.


> A special form of magnesium called magnesium L-threonate may be especially helpful for the brain because it appears to raise brain magnesium levels more effectively than some other forms.

The study that made this claim was performed by the person who patented magnesium L-threonate and sells it at a high price. They go after any company that tries to sell cheap generic versions. The study was in mice and only showed small increases.

Magnesium L-threonate doesn’t get absorbed into your body and go into your brain as a lot of the supplement podcasts and social media posts have been implying. Magnesium supplements like this dissociate into their components in your digestive tract. Magnesium and threonate get absorbed separately. So if magnesium L-threonate has some special properties, it would be because threonate does something to improve absorption or maybe has other effects in the body, but that’s a big if. Remember that the person claiming it works better has been making a lot of money off of that one study.

If you have the cash and don’t mind paying the price then there’s no reason to switch. Many people find that magnesium glycinate, which is cheap, works just as well if not better. Glycine supplementation has been found independently to improve sleep, so taking a magnesium supplement that dissociates into magnesium and glycinate might be helpful in its own way.

Magnesium builds up in the body. Some people are deficient and get strong effects from initially correcting the deficiency. Take high doses for too long and you can start accumulating enough to get into excessive magnesium range, which brings problems. That was previously a rare observation but it’s occurring more as people get into magnesium supplements from podcasts that encourage constant high dose protocols and repeat claims that everyone is severely deficient. Keep the dose moderate.

> And they all wanted to put me on prescription sleeping pills. I said no to that. Sleeping pills can cause dependence, and they often treat the symptom rather than the underlying cause. As a software developer, I am used to finding and fixing the underlying problem instead of relying on the quick fixes these doctors were offering me.

“Sleeping pills” could mean a lot of things. Few doctors will put a patient on long-term hypnotics with high dependence liability like Ambien in the 2020s. Most doctors are hesitant to prescribe them at all in the current environment, and when they do it’s short term. I would be very surprised if you went to multiple doctors who offered to prescribe you something like that as a new patient without a complicated history. Even the people with significant long term insomnia complain about how hard it is to get doctors to prescribe those.

What they usually recommend is weaker medications with somnolence as a side effect, but the effect is weaker and doesn’t target pathways prone to addiction. Trazodone, doxepin, and a few others are common. These are not in the same category as what people think of as “sleeping pills” like Ambien that have higher dependence and addiction liability. They should not be dismissed together as one big category of drugs that are all bad for you.


Good point about L-threonate. It is indeed expensive. I use some of it, but mostly I rely on Magnesium Glycinate.


Magnesium L-Threonate is actually very cheap to produce. There’s nothing special about it other than the patent.

There were some generic versions available but the Magtein people go after them. They have to in order to protect their cash cow until the patent expires.


Even a simple ZMA worked wonders for me when my fitness coach recommended it. Got some of the deepest sleep of my life


Does this need to be supplement or can I "just eat the right food"?

Or is there a "maximum low level deficit" which you will never leave with just eating the right stuff?

(Like VitamineD deficit - it can get so low, that you cant fix it by "just going more into the sun")


From my experience, it took about a month of 150mg magnesium supplementation per day to see effects, two months for my insomnia to go away entirely.

Doing a quick search for magnesium-rich foods, it seems like it would take either an unsustainable focus on eating these foods to see results on a similar timeline or an extremely prolonged timeline to see similar results.

That said, I am not a doctor or nutritionist. But my instinct is that you can get so far in the hole with a lifetime of magnesium deficiency that supplementation is by far the most time- and lifestyle-efficient to digging yourself out. Whether or not switching to magnesium-rich foods can sustain you being at correct levels will end up depending on what the size of the deficit was in the first place, but is probably worth a try.


This one: -- take either an unsustainable focus on eating these foods to see results on a similar timeline --

Same as with VitD, seems like - at some point, your level is just that low that you cant restore it by "just eating right", you need more firepower


Aka solar power

I find magnesium great - but I also like 5-HTP which I find also helps me sleep if I take it with a little food about 30 mins before bed. I find I feel a lot calmer when taking it - and it helps my ADHD - though I don't take it for too long, as I never like to take anything for too long.


Never taking a supplement for too long is great advice. Always cycle things in and out to avoid some potential for accumulating too much in the body.

There are some horrifying case studies where people took like too much zinc, or copper, or some other thing for years and got really really messed up.


The only thing I did take for a long time was Fenugreek seed extract, but recently read long term us is potentially toxic, so stopped that, but I really liked how that made me feel.

Did you take a blood test for magnesium level?


Blood tests are pretty useless for magnesium. The deficiency is in cells, magnesium level in blood is not a good test for that deficiency.


They have blood tests for both (serum or RBC):

The Magnesium RBC Test measures magnesium inside red blood cells, providing a more accurate assessment of magnesium status than serum tests.


wouldn't a cell deficiency lead to it depleting also the magnesium levels in the blood, simply based on osmosis?


The organism dumps Mg on the blood as much as necessary because it needs to remain in stable concentrations.

When a serum Mg test comes out low, the patient already has severe deficiency and visible symptoms, so isn’t very useful unless you’re investigating a systemic issue.

As explained by my endocrinologist.


If blood concentrations drop, you die.


what is a good test for magnesium deficiency?


They only have blood tests, and that's not very useful.


Your comment sounds like an AI-generated advertisement.


I don’t think it’s AI-generated, but it is repeating a lot of the points that are commonly repeated in supplement ads: The claim that Mg L-threonate is special originates from the person who patented it and sues anyone else who produces it. The claims that multiple doctors tried to push “sleeping pills” and they’re all bad is a common theme in communities that accept supplement research and claims unquestionably (like patented magnesium forms being superior) but have an innate distrust of doctors and medicine.

I think this is just what happens if you read a lot of supplement forums and listen to the supplement podcasts a lot: You start developing elevated beliefs about the supplements, disdainful beliefs about doctors, and think you’re making superior choices having done your own research. That last point is some times critical for the supplements working, because if you believe you’re taking something special after having cracked the mystery by listening to 50 hours of Huberman or Rhonda Patrick (as examples) then the placebo effect will supercharge the result. Having belief that you’ve solved the problem makes the effects much stronger, especially for cases like this where the underlying problem was already pointed out as being stress related.


So where's the advert link to his favourite supplement, search those phrases and there will be 200 different brands selling this same commodity so which one is paying him commission ? All?

Hmmmmmmm

People sharing their experience doesnt immediately mean AI-generated advert


All of those supplements are made with “magtein (r)” branded magnesium l-threonate. It all goes back to the same company and that company is the one that has supplied the “studies” that prove its effectiveness. And by “supplied” I mean that the literal vice president of the company’s research arm was an author on at least one of their studies but didn’t disclose his connections until a follow-up update to the study.


I'm not taking either side but people don't need to directly link to their own store to benefit from increased awareness and "hype" in some product category - a rising tide lifts all boats.

"Health" and more specifically the supplement industry is just a revolving door of fads. There's also survivorship bias, those who are obvious get banned quickly.


If my Instagram feed is anything to be believed, apparently we all need to be taking extra electrolytes in now.


I'm inclined to agree. I and my partner have tried various forms/brands of Mg, around 5 of them, and they have had zero effect on sleep. I have to wonder if all positive experiences here are either placebo or shills. Similar goes for the several supplements out there.

Why AI-generated? Because the quality of his writing is better than that of his critics?


Speaking of which, I think it's a great idea for everyone to get their vitamin levels checked. Your doctor is unlikely to order such a blood test unless you are in an extreme situation, but it's cheap (around $100) to get a pretty extensive panel done.

I did it recently and found out basically all my b vitamins were in the toilet along with my vitamin D level. I started taking a b complex vitamin and D3 supplement and found immediate improvements to brain fog and exhaustion.


Interesting, my doctor recommends doing a blood panel every 5 years.


A lot of doctors only want to do a more critical set like like triglycerides, c-reactive protein, cholesterol, stuff like that. I've never had a doctor proactively want to test things like b vitamin levels.


Do you mind sharing which type you take (brand as well)? I tried magnesium glycinate supplements for two nights in a row and they kept me wide awake.


In some people they can do ths.

Most magnesium doesn't cross the blood brain barrier, such as the one you tried.

Try magnesium threonate, which does.


> As a software developer, I am used to finding and fixing the underlying problem instead of relying on the quick fixes these doctors were offering me.

Your body isn't a piece of software.

It can get easily get stuck in conditions that we aren't used to happening in computers. Eg, some injury causes inflammation and pain in a different part of your body, and even after the initial injury heals itself, the inflammation and pain in another part of your body continues of its own accord, and a "quick fix" of some NSAIDs can cure it within hours.

I'm glad you are feeling better, but reading all that great stuff about magnesium could have primed you to think that supplementing it would work, therefore it worked. The placebo (and nocebo) effects are very powerful.


On the other hand, reducing supplementation solved my sleep issues. I was taking Magnesium at night, and D+C+Fish+CoQ10+Iron+B12 in the morning.

I don't know what the hell I was taking too much of, but I didn't have a good way to test it. I wish the body had some indicators.


Magnesium, melatonin and none of the other supplements really worked for me.

I microdose with an specific drug and it did help improve my sleep. I know it's not placebo because sometimes I forget to take it and it coincides in the sleep log with worse sleep.

Anyway this drug isn't a panacea but a paliative while a treat the root cause. In my case it is a stress-related disorder and the real treatment isn't quick and easy, it requires life changes.


Magnesium absolutely helps, and with our modern farmed diet, most people are deficient. It it part of over 300 chemical reactions in the body.

I've also been seeing a lot of comments about melatonin. For those taking it, as long as you aren't on an SSRI or other seratonin regulator, take 500mg (up to 2g) of L-Tryptophan. It's one of 9 essential amino acids (of like 22) that we only get from food, and is the basis of seratonin. The chemical process in the body is Tryptophan -> 5HTP -> Seratonin -> Melatonin. Again, because of our modern diet, we don't get enough of these essential amino acids. Many people with mild anxiety have gotten off anti-anxiety meds by switching to just taking tryptophan. Anyway, it's helped me, but it gets a bad rap because "tryptophan makes you sleepy after Thanksgiving". Actually, no it doesn't, it's the amount of food you eat, honestly.


> As a software developer, I am used to finding and fixing the underlying problem instead of relying on the quick fixes these doctors were offering me.

Bro Science, HN Edition in one sentence. Nice.


In Mice!!!!


I am a brogrammer and I fix problems, bro. Magnesium for life.


Do you take magnesium specifically at night, or does it not matter when you take it? I'm not sure if it's something your body stores for use when it needs it or if it just throws away what it doesn't need or use.

I take it at night. Unfortunately I haven't found a controlled release version of magnesium that works.

I sometimes also take it during the day when I feel my muscles getting stiff, I get relief within 15 minutes.


Retired software developer and my wife suggested the same and it worked. As a veteran I also believe it mostly fixed my sleep apnea episodes that I never sought formal diagnosis for before. We also do 5 mg melatonin now which helps. The magnesium oxide at bedtime is great though.


Yes, magnesium has helped.

For me, avoiding high histamine foods as well as histamine liberators had helped tremendously.

The theory:

Anti-histamines like Benadryl make you sleepy by blocking histamine.

Well, instead of blocking the histamine, get rid of it in the first place by avoiding histamine foods (for example aged or preserved meats).


Histamine has different pools, functions, and receptors in the body. You’re reducing it all to one single level that goes up or down with diet but that’s not how it works.

The brain histamine in your neurons is primarily synthesized from an amino acid. The histamine levels in neurons are different than the levels in mast cells.

There are a lot of degrees of hand waving in your theory that don’t work.


Hey Aurornis,

I definitely haven't looked into the underlying models of histamine to see how things work.

My observation is that, when I avoid histamine related foods, I sleep longer and fall asleep faster. The naive model is what led me to try that. But I totally acknowledge that there's likely way more at play under the hood. And I would like to know more about why this works! Or, at least why it works for me.

Thank you for pointing out the complexity of the underlying mechanism.


I can also vouch for magnesium and the l-threonate variant. I take both before bed along with glycine powder, phosphatidyl-serine, l-theanine, l-tryptophan, ashwagandha, and saffron. No melatonin, no sleeping pills. Finally getting decent sleep for over a year now.


Holy Dunning–Kruger effect...

As a software developer, I am a much better doctor than actual trained doctors, and am definitely immune to any placebo effects.


I don’t know anything about the specifics of this case. I do know there are lots of bad doctors. Doctors routinely make mistakes or overlook things, especially relatively trivial things like this.

I don’t know what people think you learn in medical school that makes you an infallible source of health knowledge.


Doctors do overlook simple natural solutions. This is because of how evidence-based medicine works.

The problem is not with evidence-based medicine itself, but with how the evidence is generated. The gold standard of medical evidence--a large, randomized, double-blind clinical trial--is extraordinarily expensive. In practice, much of this research is funded by private industry, which must have a reasonable expectation of earning a return on its investment. That naturally directs research toward treatments that can be patented, commercialized, and sold at a profit.

This creates a structural blind spot. Many naturally occurring compounds cannot be patented in their natural form, making it difficult to justify the enormous cost of conducting the kind of trials that modern medicine demands. As a result, potentially useful natural therapies often remain under-studied, not because they have been proven ineffective, but because the economic incentives to investigate them are weak.

This is the reason your doctor is much more likely prescribe Ambien CR than to suggest trying magnesium supplements.


Trained doctors pushed opiates and benzos on me when they were very much not needed and in both cases led to dependancies and horrific withdrawals. I'm sure many others can chime in with their own similar experiences. Medical professionals are incredibly crucial to the wellbeing of society, but they have also been responsible for much suffering because they are human just like us.


> Holy Dunning-Kruger effect…

Do you know they’re wrong? Please don’t invoke Dunning Kruger like this, it’s cliché and also wrong to do. There’s no indicator for whatever it is Dunning & Kruger showed, you cannot know if it applies to a single person. Their main plot showed a positive correlation between confidence and competence. Their paper has problems, their methodology has been rightly questioned, and some attempts to reproduce have failed. Plus keep in mind that, ironically, for people who are intimately familiar with the debate over DK, using it to essentially name-call someone backfires and has the opposite of the intended effect, it makes the name caller look confidently ignorant.


The claim is anecdotal and entirely possible that it's a placebo effect. But the author is making it sound like a definitive root cause to their issue. This is so typical of the software dev community.

> entirely possible that it’s a placebo

Placebo Effect is not Dunning Kruger. Making incorrect assumptions or having incorrect beliefs is not Dunning Kruger either.

Possible is not certain. So if it’s not a placebo effect? If the author found a solution that is in fact a better root cause fix for themselves than sleeping pills? What does that make their comment? What does it make yours?

> This is so typical of the software dev community.

IMO this is a worse assumption with less evidence than the one you’re complaining about, and it’s pure unsupported assumption and far more likely to be wrong. Distrust of doctors and “western medicine” is common enough to hear it all the time, I know more non-devs than devs who carry such beliefs. Unless you have statistics on devs compared to the general population, your personal sampling is entirely anecdotal, and biased.


Those invoking Dunning-Kruger are, with high probability, an instance of just that :) (also, see the comment below that touches upon the many gaps in the original paper, which is at this point just garbage invoked by midwits). Finally, there’s a thing called heterogeneous treatment effects, which really is hard to detect at medical research scale … and placebo effects, if they help with the underlying issue without breaking the bank, and still helpful.

Doctors simply don’t treat things well that are not classified as a particular disease. If you want to get stronger or more fit, you may well be better off asking your local bro than your PCP.

Sleep is sadly in the same category. If you don’t have sleep apnea, and you want to get treated for sleep, you will be offered any number of pharmaceuticals, all of which are terrible. Better advice comes from other people dealing with sleep issues in this case.


Doctors generally aren't trained in systemic level thinking, probably because given how complex the body is any such broad connections can only be "intuitive" rather than rigorous, more an art than a science.

This is probably the only reason why "naturopaths" and other "holistic" doctors are still in business, because they'll actually bother to consider a broader picture of a symptom as hinting at some structural imbalance rather than solely treating the symptom as a localized issue to resolve.


I’ve read so much on magnesium and believe in the benefits of supplementation, but when I try it (regardless of type) I end up feeling devoid of energy and borderline depressed for three days after.

FYI here. I and my partner have tried various forms/brands of Mg, around 5 of them, and they have had zero effect on sleep. I have to wonder if all positive experiences here are either placebo or shills. Similar goes for the several supplements out there.

Magnesium also solved my restless leg syndrome at night. I take magnesium glycinate. I bought the powder and sprinkle some on my nighttime ice cream sundae a few hours before bed.

>nighttime ice cream sundae I assume that’s a joke.

And what is the root cause of your magnesium deficiency? How come you're not getting enough of it from food?

>As a software developer

My man has written too many JIRA story descriptions


Good for you. Personally I just take four zzzquil ultras every night.


Which form do you take? Have you tried different forms?

Magnesium glycinate and magnesium taurate work for me. I mainly rely on the former.

It does literally nothing for me.

FYI here. I and my partner have tried various forms/brands of Mg, around 5 of them, and they have had zero effect on sleep. I have to wonder if all positive experiences here are either placebo or shills. Similar goes for the several supplements out there.

I have severe sleep issues and have tried a bunch of sleep related supplements and medications. Although I do not have a dietary deficiency Magnesium might be the single most effective for me at keeping me asleep, although it does nothing to help me get to sleep and unfortunately the most effective dose taking magnesium alone is around 500mg which is enough to make me even more tired than usual the next day (so not really a good option on its own for me). I have found a combination of 250mg magnesium (carbonate or extended release oxide + citrate, which seem to work equivalently in my limited testing other than that the scoop I have for the carbonate powder is for 350mg so I might take somewhat more in that form) and 2.5mg baclofen to work better than either at higher doses alone (baclofen in higher amounts quickly stops working when taking it multiple days). Unfortunately sleep issues of any severity are often fairly random so it takes quite a while to have any confidence that something is actually helping even if it seems to at first; magnesium is one of the very few that seem to help me.

I have recently been taking those with .3mg DR melatonin and 8-9mg diphenhydramine and it still has some effect the next day but much less than the higer doses of magnesium. The diphenhydramine is for my Non-24 and does not help me sleep but can improve my functioning some the next day when part of my body wants to be sleeping during the day (unfortunately like many things it seems to quickly lose effectiveness so I am going to try taking it less often). My thinking is that for long term use for sleep it is imporant that the medication or supplement be cleared from the body quickly, though too early and it may be hard to stay asleep.

Sleep doctors have told me that waking up at the same time every day is most important. It doesn't look like the paper tried to differentiate between irregularity waking up and irregularity going to sleep but I suspect trying to wake up as close to the same time every day as you can reasonable manage is the best thing most people can do to improve their sleep quality (getting to sleep earlier some days if needed). My sense is that the most obvious part of what we consider to be sleep quality is actually waking up quality. Sleep deprivation affects memory in subtle and eventually not so subtle ways but not feeling awake seems in my experience to be based on how waking up happens and sleeping less when relatively well rested often has a positive effect on feeling awake (at least for a while, getting tired early is another effect of not sleeping enough). There is a particular thing that I notice maybe a couple of times a year that feels like rapidly cycling between being asleep and awake multiple times when I am waking up and I always feel much more awake the day it happens.


It's funny you talk about treating the root cause, and take magnesium, instead of addressing the workplace stress factor.


I get what you’re saying, but I think it’s fair to view it as equivalent to drinking a protein shake after a workout. You used the resources in a productive and healthy way, now you need to replenish them.


sure if you're just taking it as a dietary supplement, but clearly OP is using it as a form of sleeping pill. which is also fine but just seems like mental gymnastics.

Stress pays my mortgage unfortunately, and I don’t have a way to make money otherwise because all the jobs in my profession of over a decade are stressful.

The magnesium deficiency would probably still exist if you removed the stressful job. Unfortunately switching jobs or careers is not an option in this current job market.


You are absolutely right about that. It is important to reduce stress. Insomnia is only one of the ways excessive stress shows up.

> You are absolutely right about that

Not helping the 'AI ad' claims lol


Nice ad!


Steve Jobs?


Don't eat pills. Fix your diet.


Why?


I'd refine it as 'If feasible, try fixing your diet before going for pills'. The body is adapted to function within a healthy nutritional range. If your diet falls outside that range, it's expected that your body won't function properly. If problems persist despite a good diet, then pills become a more reasonable option.


Because it's unlikely that a specific deficiency is your only single problem.


Based on what? You seem to be assuming that the only way to be deficient in something is to have a junk diet. It is quite easy to be deficient in just one nutrient.




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

Search: