Every night, millions of Americans have trouble falling asleep or staying asleep. Quite often this is caused by stress, anxiety, caffeine or overstimulation before bed. But there is another common cause that few people even know to consider—a nutritional deficiency of one kind or another. If you have such a deficiency, once it is identified you can easily correct it—and start enjoying peaceful slumber once again.

This is a far superior approach to prescription sleeping pills, which not only fail to address the underlying reason for sleeplessness but often are also addictive and have side effects such as disorientation and next-day fatigue.

One example: My usually bubbly and energetic colleague Kathryn suddenly started dragging at work, even nodding off during meetings. At night she would awake with unpleasant and uncontrollable urges to move her legs. The surprising cause turned out to be related to Kathryn’s new vegetarian diet, which she had started several months before—without meat, her diet no longer included the iron she needed. As a result, she had developed restless legs syndrome, which makes sleeping a real challenge. The simple solution: Her doctor prescribed iron supplements and began monitoring her levels. Now Kathryn sleeps like a baby and is once again bursting with energy at the office.

Nutritional Deficiencies Interfere with Sleep

Iron and restless legs syndrome is just one of the hidden dietary deficiencies affecting sleep. For more insight on potentially sleep-disturbing dietary deficiencies and how to address them, I turned to our nutrition guru, contributing medical editor Andrew L. Rubman, ND. If you suffer from insomnia, he recommends consulting a doctor who is knowledgeable about nutritional biochemistry to assess your nutrient levels and offer diet advice and/or supplements to support your body’s natural sleep processes.

Dr. Rubman told me that the following nutrients are strongly related to sleep…

Calcium: Nature’s Sedative

When you run short on calcium, you are apt to toss and turn and experience frequent awakenings in the night. This mineral has a natural calming effect on the nervous system. It works by helping your body convert tryptophan—an essential amino acid found in foods such as turkey and eggs—into the neurotransmitter serotonin, which modulates mood and sleep. Serotonin, in turn, is converted into melatonin, a hormone that helps regulate the sleep cycle.

Dr. Rubman suggests: It’s always better to get the nutrients you need from food rather than supplements. Milk and dairy products are the most common dietary sources of calcium, but Dr. Rubman notes that many people have trouble digesting cow’s milk, especially as they grow older. Excellent nondairy sources of calcium are leafy green vegetables such as kale and collard greens, canned sardines, sesame seeds and almonds. The Recommended Dietary Allowance (RDA) for adults over age 18 is 1,000 to 1,200 mg/day. For those not getting enough from dietary sources, Dr. Rubman often prescribes the calcium-magnesium supplement Butyrex from T.E. Neesby. (Read about magnesium just below.) Take it half an hour before going to bed.

Relieve Leg Cramps with Magnesium

Nighttime leg cramps, often due to a magnesium deficiency, are a common cause of sleeplessness. Magnesium helps your body’s cells absorb and use calcium, so this mineral pair works hand in hand to relax muscles, relieve painful cramps or spasms and bring on restful slumber.

Dr. Rubman suggests: Leafy green vegetables are the best source of dietary magnesium, followed by artichokes, nuts, legumes, seeds, whole grains (especially buckwheat, cornmeal and whole wheat) and soy products. The Butyrex Dr. Rubman prescribes for calcium deficiency contains magnesium, so it helps solve this problem too. (The RDA for magnesium for adults is 400 mg/day for men and 310 mg/day for women.)

Vitamin B-12 for Serotonin Production

Vitamin B-12 supports the production of neurotransmitters that affect brain function and sleep, helping to metabolize calcium and magnesium and working with them to convert tryptophan into the neurotransmitter serotonin. Insufficient B-12 may be a factor if you have trouble falling or staying asleep.

Dr. Rubman suggests: Foods rich in vitamin B-12 include liver and other organ meats, eggs, fish and, to a lesser degree, leafy green vegetables. For B-12 deficiency, Dr. Rubman sometimes prescribes B-12 tablets taken sublingually (dissolved under the tongue) one hour before bedtime—but notes that it’s important to take a multivitamin that contains B vitamins twice daily as well, since it helps your body use the B-12 efficiently. Note:Most B multivitamins contain B-12 but only a minimal dose, Dr. Rubman said, so further supplementation is usually necessary.

Vitamin D Modulates Circadian Rhythms

Again with the vitamin D! We can’t hear enough about the importance of this vital nutrient, it seems—and indeed, vitamin D turns out to be essential to support your body’s uptake and usage of calcium and magnesium. Its role in sleep involves modulating your circadian rhythm (the sleep/wake cycle that regulates your 24-hour biological clock).

Dr. Rubman suggests: Pointing out that most Americans have less than optimal levels of vitamin D, Dr. Rubman said he commonly prescribes daily supplements of D-3, the form most efficiently used by the body. He noted that 10 to 20 minutes of sunshine daily helps your body manufacture vitamin D, and foods such as fish and fortified milk are rich in this nutrient.

Herbs: Some Help, Some Interfere with Sleep

Although they do not specifically address nutritional deficiencies, Dr. Rubman also recommends relaxing herbal supplements such as chamomile, hops or valerian to gently nudge you toward sleep. Try them in teas, capsules or tinctures from reputable manufacturers such as Eclectic (www.eclecticherb.com), taken half an hour before retiring.

Though many people swear by melatonin, Dr. Rubman said that there is not enough scientific evidence yet to demonstrate that this popular sleep supplement works efficiently and without long-term ill effects. He does not prescribe it.

It’s also important to be aware that a number of supplements are stimulating and may cause sleep irregularities in some individuals. The biggest stimulators:Ginseng, ginkgo, St. John’s wort, alpha lipoic acid and Sam-e. If you take any of these, do so early in the day, take the lowest dose that seems effective for you or discuss alternatives with your physician. These are all best used under professional guidance.

A Soothing Bedtime Snack

Dr. Rubman told me that his favorite sleep inducer is to head upstairs each evening with a soothing bedtime beverage—either a cup of herbal tea with honey or a glass of warm milk (though not everyone’s digestive system easily tolerates milk). He generally advises against late-night snacking, which can disturb sleep, but if you must have something keep it light. A high-protein, low-glycemic snack, such as a banana with peanut butter or half a turkey sandwich on whole-grain bread can help encourage serotonin production… and sweet dreams.