As Inc. colleague Jessica Stillman points out in her viral article on why you should adopt the sleep habits of a toddler, getting a good night's sleep was hard enough before the pandemic.

"Coronasomnia"? It's a nationwide epidemic. So is the "Quarantine 15" weight gain phenomenon.

At least in part because, as research shows, the two create a vicious circle: Lack of sleep leads to a poorer diet -- and a poorer diet leads to lack of sleep.

First some background. Lack of sleep has long been linked with weight gain and obesity. A 2012 study published in Sleep found that reduced sleep leads to a significant increase in eating. That's partly because, as other studies show, lack of sleep causes increased activity in your brain's reward centers specific to food. Lack of sleep also change some of the hormones that signal when you're full.

So, yeah: If you don't get enough sleep, your diet almost surely suffers -- as anyone who pulls a near all-nighter and finds themselves craving junk food the next day can attest. 

But then there's this: A 2016 study published in Journal of Clinical Sleep Medicine found that diet has an effect on the quality and amount of sleep you get: Eating more fiber -- whole grains, beans, certain vegetables and fruits, etc. -- and less sugar and saturated fat results in better sleep at night. 

And if you adopt the Mediterranean diet -- lots of vegetables, fruits, whole grains, fish, poultry -- a 2018 study indicates you'll be one-third as likely to suffer from insomnia and nearly 1.5 times more likely to get a good night's sleep

Add it all up, and whether you start with the chicken or the egg, the cycle is the same.

Don't get enough sleep and you're likely to eat more poorly, which makes it harder for you to get more sleep, and therefore more likely to eat poorly. The same is true if you eat poorly; getting enough sleep is harder, which will make it harder to eat healthier and to get enough sleep.

What about supplements, you ask? Plenty of people take melatonin to help them fall asleep. And that does work; a study published in Sleep Medicine Reviews found that people who take melatonin supplements tend to fall asleep around four minutes faster than those who don't.

Which is great -- except a more recent study found that maintaining a Mediterranean diet cut the time to fall asleep by 12 minutes, and led to significantly better sleep quality.  

In short, supplements can help.

But lifestyle changes can help more. 

So turn your diet and sleep into a virtuous rather than vicious cycle. Tonight, pick a time you will go to bed. Not go to sleep -- go to bed. See bedtime not as the time you will definitely fall asleep, but the earliest time you might go to sleep. (Unless you're totally exhausted, you won't fall asleep right away.)

Then just relax. Let your mind wander. Don't think about going to sleep. Don't try to go to sleep. Just chill.

If it takes you a long time to fall asleep, that's OK. Don't take a nap the next day. Just go to bed at the same time. Again, see it as bed time, not sleep time, and just chill.

In time, your body (and more important, your mind) will start to adapt. You'll start to get more and better, sleep.

Especially if you focus on eating healthier as well -- because when you do that, you'll naturally start to sleep better.

Which will make it a lot easier to keep eating healthier.

Win-win.