What you eat – and what you don’t – may be the solution to your sleepless nights.

If you’re stuck counting sheep, calculating just how many hours of shuteye you’d get … if only you could just fall asleep, you’re not alone. Difficulty sleeping is a common complaint that may have a variety of causes, from electronic overstimulation and stress, to hormones and, yes, your diet. Getting 7-8 hours of beauty sleep does more than keep your skin looking young. Bedtime bonuses include a stronger immune system, better mental focus, and reduced risk of heart disease and high blood pressure. Additionally, those who get sufficient slumber report having better sex, improved moods, and better weight control – wait, could these be related? Those sweet dreams also reduce your risk of injury, decrease chronic pain, and according to a study published in the journal Science, rest may actually help your brain to detoxify. The brain removes toxic waste through the lymphatic system which becomes more active while you sleep. It is believed that among the toxins being expelled are the harmful proteins linked to disorders such as Alzheimers.

➤ FOOD TO EAT

Adding the following foods to your diet – and equally important, eliminating others – may help you ditch the Ambien and slumber sweetly.

fishFISH
You may have heard of tryptophan, courtesy of the Thanksgiving turkey. This amino acid raises serotonin levels that are needed to make melatonin. Well, tryptophan is also found in fish. In addition, fish is rich in vitamin B6, another component needed to make melatonin. Studies have shown that eating foods rich in tryptophan leads to improved sleep. Seafoods high in tryptophan include salmon, snapper, halibut, cod, tuna, shrimp, mackerel and scallops.

YOGURT
Calcium is another melatonin booster, and yogurt is loaded with it. In addition, a deficiency in calcium may hamper your ability to fall asleep – so a little Greek yogurt may be just the thing to get you dreaming sweet dreams (see “Common Culture” page 100). If you’re not a dairy fan, add a plan- sourced calcium supplement to your routine.

bananaBANANAS
Packed with potassium and loaded with magnesium, bananas help to relax overstressed muscles, and may even help relieve restless leg syndrome, which interferes with a good night’s sleep. Bananas also contain tryptophan and vitamin B6.

CHICKPEAS
Grab a bowl of hummus, and dig in. The small but mighty chickpea is not only rich in tryptophan, but also in folate and vitamin B6. Folate has been shown to regulate sleep patterns, especially in older people.

tartcherryTART CHERRIES
This fruit and its juice are among the few food sources of melatonin. In a small study, participants with chronic insomnia were given eight ounces of tart cherry juice in the morning, and another eight ounces in the evening, and reported improved sleep.

NUTS
The protein in nuts helps maintain a stable blood sugar level, which promotes sleep, while the unsaturated fats improve your serotonin levels. They are also rich in magnesium and calcium – walnuts and cashews are a good choice.

KALE
All hail kale! Lauded for everything from lowering the risk of cancer, decreasing blood pressure, improving bone health, and more, the high calcium content of kale and its leafy cousins may also aid in sleep. As if you needed another reason to eat it!

COMPLEX CARBS
The right combination of complex carbs may cut in half the amount of time it takes to fall asleep, so have a helping of sweet potatoes or Jasmine rice with your dinner. Sweet dreams!

WILD LETTUCE
Known for its calming effects, wild lettuce is helpful for restlessness and insomnia. It may even help with restless leg syndrome. Wild lettuce is also available as a supplement and is quite safe – take 30 to 120 milligrams before bed.

HERBAL AIDS
Chamomile, lavender, passion flower, valerian, California poppy, and kava kava are all known to help promote relaxation, and can be enjoyed as a tea before bed.

➤ WHAT TO AVOID

ALCOHOL
Avoid drinking alcohol four to six hours before bed. While a nightcap may make you fall asleep faster, alcohol reduces your sleep quality, waking you up later in the night.

LATE MEALS
Stay away from big meals at night. Try to eat dinner at least four hours before bedtime. Fatty foods, and foods high in protein take a lot of work to digest and may keep you up if eaten within two hours of trying to sleep. Also be cautious when it comes to spicy or acidic foods in the evening, as they can cause stomach trouble and heartburn.

CAFFEINE
Cut back, and not just on coffee – tea and chocolate contain caffeine, too. It can cause sleep problems up to ten to twelve hours after consumption, so consider eliminating it after lunch.

EXCESS FLUIDS
Staying hydrated is important, but try to get your fluids in long before bedtime. Drinking a lot of water, juice, or tea right before you go to sleep may result in frequent bathroom trips throughout the night. Caffeinated drinks, which act as diuretics, only make things worse.