You know that having a double-shot latte after 4 p.m. or plowing through too much sugary dessert will keep you from snagging a solid 8 hours of z's. What you probably don't realize is that there are a number of nutritious foods—ones that doctors and dietitians agree are part of a healthy, varied diet—that could be to blame if you're tossing and turning at night.

The kicker is that getting a good night's sleep is crucial to sticking to healthy eating habits. One recent study found that a consistent sleep routine may help people maintain a healthier weight; other research found that a lack of sleep can lead people to buy more food and more high-calorie items at the supermarket. Which, of course, keeps us up at night. And the vicious cycle continues.

MORE: Your Grocery Store Is Making You Fat and Broke. Here Are 6 Ways to Change That.

To be sure good-for-you grub isn't actually sabotaging your shut-eye, steer clear of these foods before bedtime:

1. Cruciferous veggies

Sounds absolutely crazy, right? Veggies like broccoli and cauliflower are loaded with phytochemicals, vitamins, and minerals proven to help the body's natural detoxification process and even prevent cancer. (Try making bread out of broccoli.) What's more, they even contain tryptophan—the sleep-inducing amino acid that helps the body produce serotonin, which regulates sleep. However, crucifers are also loaded with insoluble fiber, which is the slow-digesting kind, said Elissa Goodman, a certified holistic nutritionist in Los Angeles.

"If you eat a lot of insolublefiber close to bedtime, your body will still be working on digesting it while you're trying to drift off, which can prevent you from getting optimal sleep," she said. Of course, you should still eat these health-promoting vegetables—just have them at least a few hours before bedtime, Goodman said.

MORE: 5 Surprising Clean Foods That Will Make You Sleep All Night

2. Tomato sauce

It's packed with vitamin C, iron, and lycopene, an antioxidant that's been shown to reduce the risk of heart disease, cancer, and macular degeneration. However, it's also highly acidic, which can lead to heartburn and indigestion during the night, said Alissa Rumsey, RD, a dietitian and spokesperson for the Academy of Nutrition and Dietetics. To prevent sleep issues, skip the late-night pizza or pasta and be sure you finish meals that involve tomato sauce at least 3 hours before you hit the hay, Rumsey said. (Here are the 9 healthiest pastas you can buy.)

3. Dark chocolate

Chocoholics have been rejoicing lately, thanks to a slew of studies that show big benefits of noshing on this antioxidant-packed treat. However, while a square or two of dark chocolate might be a healthy way to satisfy your after-dinner dessert craving, it's not going to do anything to help you get sound sleep, thanks to its caffeine. In fact, some dark chocolate contains as much as a quarter of the amount of caffeine found in a standard cup of coffee, Rumsey said. And the darker the chocolate, the more caffeine it likely contains.

"Dark chocolate also contains tyrosine, an amino acid that can be very stimulating," Rumsey said.  

4. Charcuterie

Cured meats and aged cheeses may make a beautiful party platter, but snacking on these foods might keep you up, Rumsey said.

"Aged cheeses and preserved and smoked meats contain tyramine, an amino acid that triggers the release of norepinephrine, a stimulant that makes us feel more alert," she said.

MORE: The 8 Best Clean-Eating Snacks for Cheese Lovers

5. Red meat

While it's filled with protein and can be lean—particularly if you're choosing clean, grass-fed options—red meat is still on the fatty side, which take your body a while to digest. Translation: If you have steak or a cheeseburger for dinner, you could very well still be digesting that meal when you're trying to drift off, which can keep you awake, said Beth Warren, RD, author of Living Real Life with Real Food. High-protein diets have also been linked to sleep apnea, she said, a condition that prompts you to stop breathing for bouts of time throughout the night, which can reduce the quality of your sleep.

6. Spicy foods

Thanks to their metabolism-boosting benefits, spicy foods are often touted as especially beneficial if you're trying to drop a few pounds. (Plus, they're one of five foods you can't overeat.)  However, meals that bring the "heat" can also prompt you to have a restless night, thanks to the fact that they raise core body temperature, which can negatively impact your sleep. Spicy foods can also lead to heartburn, said Natalie Stephens, RD, a dietitian at The Ohio State Wexner Medical Center, which can make you so uncomfortable that it's tough to drift off and stay asleep.

This article originally appeared on EatClean.com.