Trying to avoid these foods before calling it a night might help you get better quality sleep.

It's best to try to give your body some time to digest before laying down for the night, and eating too late make you feel too full when you're trying to comfortably snooze. However, it happens and sometimes the days are long and you end up eating dinner soon before bed or you might be hungry for a midnight snack. (And it's better to eat a little something than to try and sleep with a growling belly!)

That said, some foods are better than others before bedtime. Some foods help boost melatonin levels to help you sleep, while others might keep you wide awake. Worried about those troublesome sleep disturbers? Watch out for these 10 foods, which could keep you up way longer than you'd like, plus some healthy options to have instead.

1. Tomatoes

"For those with acid reflux problems (or women who temporarily have them while pregnant), tomatoes and other acidic foods can cause pain and discomfort in the esophagus when you lay down," says Kelly Jones M.S., RD, CSSD, LDN. Enjoy them earlier in the day when you'll be upright and be sure to eat them with other non-acidic foods that balance out the reaction in your stomach.

2. Cheeseburgers

A cheeseburger (just like all foods) can be enjoyed from time to time as part of a healthy eating pattern but late night isn't the best time to enjoy them. "The excessive amounts of saturated fat can slow gastric emptying, leaving food in your stomach, and blood flow directed there while you're trying to fall asleep," says Jones. This can cause the body's hormones to shift to digestion and absorption, rather than sleep.

3. Donuts

Save your donut to have with an omelet in the morning (some good protein!) or as a special treat from time to time. "This food is both fried and high in sugar which can cause digestive discomfort and blood sugar reactions for some people," says Jones. Remember that thing called a sugar rush? Definitely not the best option before hitting the hay. To satisfy a nighttime sweet craving, turn to natural sources of sweetness like fruit, lightly-sweetened herbal tea (that's caffeine-free) or whole-grain bread with peanut butter and honey.

4. Chocolate

"While it's many people's favorite way to snack at night, chocolate does contain caffeine," says Jones. Caffeine can be stimulating, so if you're sensitive, you'll want to steer clear. "Many people opt for dark chocolate because it's lower in sugar and higher in antioxidants, but it's higher in caffeine as well, so those sensitive to it may have trouble falling asleep if this is when they opt to eat it," says Jones.

5. Dried Fruit

Dried fruit is high in fiber and naturally-occurring sugar, both of which can lead to an overactive digestive system too close to bed. Fiber has so many amazing health benefits but when you're chowing down on dried fruit late night, you may end having a little too much fiber too soon, which can lead to gas and bloating that might keep you (or your partner) up at night. Instead, stick with a small serving of fresh fruit, like a small apple or a cup of berries.

6. Spicy Foods

Go mild when close to bedtime as spicy foods, like hot chili peppers and certain sauces and condiments, can be more acidic and lead to digestive discomfort. Plus, if you have acid reflux, it may act as a trigger, making it hard to sleep. Spicy foods may also exacerbate symptoms of IBS, so if you have a sensitive stomach, it's better to enjoy spice in moderation during the day and avoid it at night.

7. Pizza

This is a doozy for quality sleep: acidic tomato sauce, high-fat cheese and refined bread might leave your tummy will be rumbling when yo go to lay down. Don't get us wrong, pizza is absolutely delicious and if you do end up eating a slice or two close to bed, go with a healthier thin-style crust (like a cauliflower or whole-wheat crust), opt for light vs. heavy cheese if possible and ditch the marinara sauce for something light, like an olive-oil based sauce. Or opt to enjoy pizza just the way you like it earlier in the day, giving yourself a few hours to digest before laying down.

8. Steak

If sticking with a comfortable serving size, steak and vegetables actually makes a healthy meal before bed. However, if you're eating a massive 22-ounce steak dinner at a restaurant, beware. All that meat will sit in your stomach and make it hard to fall asleep from the overwhelming feeling of fullness. It all comes down to having a portion that feels good in your body when enjoying high-protein and high-fat meals (read: not leaving you hungry, but not too full either). If you're craving a filling meat-based snack, try one serving of jerky or this fun alternative for plant-based Beet Jerky.

9. High-Sugar Cereals

Having some complex carbs like oats (try a quick bowl of fruit topped oatmeal) before bed can be helpful for sleep. But any grains, cereals, muffins, or granola that has a lot of added sugar will be stimulating, making it harder to fall asleep. Avoid those high-sugar cereals and instead look for ones with a lower sugar count and some fiber to allow them to digest more steadily and keep your blood sugar levels more consistent, which can help you get a more restful nights sleep.

10. Chips

Chips you'd buy in a bag at the store might not be the best option for a midnight snack. In a study published in the journal Frontiers in Psychology, researchers found that high-fat foods, like chips, led to nightmares, so not only will you struggle to fall asleep quickly but also you might wake up in the middle of the night from a not-so-pleasant dream. Less than ideal. Instead, go for homemade popcorn to get the crunchy fix you're looking for (plus, you can customize the flavors to your liking).