Tossing and turning. Long, sleepless nights. They're draining, frustrating, and, well, exhausting—physically and mentally. And they're usually unnecessary, experts say, but can be counteracted by minor dietary tweaks. Indeed, what you put in your mouth can directly affect how many ZZZs come out. "The majority of people with day-to-day insomnia could be sleeping like puppies if they made just a few changes," says Jacob Teitelbaum, medical director of the Fibromyalgia and Fatigue Centers, which are located nationwide, and author of From Fatigued to Fantastic. "And if you know how to eat right? You're going to be way ahead of the game."

From cherries to almonds, consider these soothing, snooze-inducing foods:

Bananas. Make them a daily staple. They're packed with potassium and magnesium, nutrients that double as natural muscle relaxants. Plus, they contain the sleep-inducing amino acid tryptophan, which ultimately turns into serotonin and melatonin in the brain. Serotonin is a neurotransmitter that promotes relaxation; melatonin is a chemical that promotes sleepiness. It takes about an hour for tryptophan to reach the brain, so plan your snack accordingly.

Protein. High-protein foods promote sleep, and they also fight acid reflux, Teitelbaum says. That's important, since heartburn often flares up at night, making sleep all but impossible. Smart bets for a bedtime snack: two slices of lean meat or cheese, a hardboiled egg, or some cottage cheese mixed with fresh fruit.

Almonds. They're full of protein. And they also provide a solid dose of magnesium, promoting sleep and muscle relaxation. Chow down on a handful before bed, or spread some almond butter on toast.

Milk. Downing a warm glass will encourage sweet dreams, suggests Donald Hensrud, chair of the division of preventive medicine at the Mayo Clinic in Rochester, Minn. It's full of tryptophan, so it will have a sedative effect. Plus, it's a good source of calcium, which helps regulate the production of melatonin. "If you can't sleep or if you're waking up in the middle of the night, get out of bed and have some milk," Hensrud says. Make it even sweeter with a teaspoon of honey.

Cherries. They're one of the only natural sources of melatonin, according to a study published in the Journal of Experimental Botany in 2011. Have a handful an hour before bedtime; if fresh ones aren't in season, go for cherry juice or the dried variety.

Tea. Green tea contains theanine, which helps promote sleep. But really, all varieties are soothing enough to encourage drowsiness, so long as they're decaf. "Tea helps you relax," says Hensrud, who suggests herbal, mild flavors.

Oatmeal. Just one bowl provides plenty of calcium, magnesium, phosphorus, silicon, and potassium—all sleep-promoting nutrients. Go easy on sweeteners, though, since too much sugar could sabotage shut-eye.

While loading up on sleep-promoting foods is important, so is steering clear of those that'll have the opposite effect:

High-fat meals. Initially, that greasy burger and fries will make you feel tired by cutting off some of the oxygen headed to your brain. But research suggests people who have heavy, fatty meals in the evening clock fewer hours of total sleep than those who don't. Be particularly cautious if you suffer from acid reflux: Meals loaded with calories and fat can worsen indigestion and heartburn, not to mention leaving you too uncomfortable to sleep. If a heavy meal is on the menu, make sure it's at least three hours before bedtime.

Caffeine. Go easy on caffeine, especially if it's late afternoon or you're getting ready to call it a day. It's often the culprit lurking behind troublesome sleep. Watch out for less-obvious sources, too, like chocolate, gum, and certain medications. Still, not everyone finds it problematic. "We metabolize caffeine differently—there's a genetic basis," Hensrud says. "If I have caffeine even in late afternoon, I'll be up all night, while my wife can have a cup of coffee and go right to bed."