When battling sleep issues, taking melatonin or drinking chamomile tea might help. However, a study reveals certain foods might also aid in catching some much needed zzz’s.

Drinking caffeine or energy drinks, enjoying fried foods or sweets, and eating heartburn inducers like tomato sauce and other acidic beverages and foods interfere with a good night’s rest. The research suggests some “dietary patterns and foods show promise as sleep modulators.”

Foods that contain iron, calcium, magnesium and potassium were found to help start the natural production of melatonin in the body.

“When you feel fatigued, your body wants to raise energy levels, so it reaches for the fastest solution: sugar,” wellness expert Michael Roizen, MD, told the Cleveland Clinic.

So, if you can’t help but grab a late night snack, here are three foods might help you get a good night’s rest.

Cherries

Tart cherries and tart cherry juice have above concentrations of melatonin, which helps regulate the circadian rhythm while sleeping. One study found those with insomnia who drank or ate tart cherries have increased their sleep time by 84 minutes.

Nuts

Walnuts, almonds, cashews and pistachios carry omega-3s, melatonin, zinc and magnesium, which is like a crunchy sleep cocktail. Although it’s easy to eat more than necessary when it comes to nuts, it’s recommended to consume no more than 1 ounce of nuts, because eating too many can have the reverse effect of keeping you awake, wrote Good Housekeeping.

Bananas

Packed with vitamin B6, magnesium and potassium, bananas are a natural nerve and muscle relaxant. “They also contain all-important tryptophan to stimulate production of those key brain calming hormones. Eat whole or whizz into a sleep-inducing smoothie,” the Sleep Charity wrote.

According to the Journal of Clinical Sleep Medicine, those who eat high fiber, low saturated fat meals at night tend to have more restorative sleep.

There are plenty of food options if you’re needing extra help getting to sleep. From bananas, nuts, tart berries to more complex cryohydrates. Johns Hopkins Medicine recommends oatmeal and whole-wheat toast, which can also release the “sleepy hormone serotonin,” and doesn’t take long to digest.