For many of us, a huge motivator to perform as a high-functioning adult, which includes a balanced diet and ample physical activity, is a little sweet treat at the end of the day.

From childhood, we’ve been fed the idea that sugar is a reward for a job well done, so whether it’s actually a “little” treat or an entire salad bowl of Ben & Jerry’s Chunky Monkey with chocolate syrup on top, dessert can mark the end of a successful day in the best way.

We deserve that joy, and sugar is an important part of our diets, but is there a better — and worse — time of the day to indulge? And could housing a sleeve of Girl Scout cookies before bed be a really regrettable idea?

That’s what we — Raj Punjabi-Johnson and Noah Michelson, co-hosts of HuffPost’s “Am I Doing It Wrong?” podcast — recently asked registered dietitian and author Maya Feller when she dropped by our studio to unpack the hidden truth about sugar.

We can have the cookies, as it turns out, albeit perhaps not the whole sleeve in one sitting (more on serving sizes if you listen to the full episode by clicking above). However, eating them earlier in the day, ideally right after a balanced meal, will give us the best chance of digesting them efficiently.

“Ideally, [eating a sweet treat should happen] between lunch and dinner and really not late into the evening because remember, there’s a metabolic process that needs to happen in order for your body to handle the sugars,” Feller said.

That process, she explains, has a harder time happening if you don’t get up and activate your body so it can move the sugar out of your bloodstream, so pre-bed sugar snacks aren’t ideal.

“If you go just to lie down and you’re not moving around, you’re not giving the assist to the insulin that it needs,” Feller said, noting that insulin is the hormone that moves sugar from the bloodstream into our cells to create energy.

Feller added that if we inundate the body with large amounts of sugar without giving it a chance to properly process it, our system gets overwhelmed and isn’t able to absorb it well, which can lead to high blood sugar and that could cause a whole host of other issues.

Eating sugar before bed can also make it harder to fall asleep, disrupt sleep, reduce sleep quality, and contribute to insulin resistance.

Feller told us that if we want something sweet, the best time to consume it is with a meal, which ensures it’s absorbed with other foods and thereby allows for a gradual release of glucose into the bloodstream. Another great option is to have it between lunch and dinner.

“You’re more active during the day,” Feller noted. “There’s more time for your body to deal with [the sugar].”

So there it is. You can have your cake and avoid literally losing sleep over it.

“Sugars are basically carbohydrates. Our bodies need them,” Feller reminded us. “They’re our brain’s preferred source of energy. Without them, our body doesn’t just function the way that we want it to. We need that fuel.”

Still, it’s all about balance.

“The one thing that I want folks to think about is that it’s not all or nothing,” she added. ”[If] you eat a little bit more sugar than you intended to, all is not lost. It is a process. It’s a sum of a number of parts. It is not all or nothing — and give yourself grace.”

We also chatted with Feller about the differences between sugar, honey, agave and other sweeteners, how much sugar we should aim to get a day, her thoughts on sugar substitutes, and much more, so click above to hear the full episode or listen wherever you get your podcasts.

Make sure to subscribe to “Am I Doing It Wrong?” on whatever podcast platform you prefer so you don’t miss a single episode from our brand-new third season. And check out some of our favorites, including how to apologize or vanquish your credit card debt; how to find love online or overcome anxiety; tips for online shopping, taking care of your teeth and pooping like a pro; secrets to booking and staying in a hotel; how to deal with an angry person; how to make friends as an adult; everything you need to know about protein; getting your best workout; taking care of your car; surviving a breakup; avoiding forever chemicals, plus much more.

You can also watch the full episode on YouTube.

For more from Maya Feller, visit her official website.

Have a question or need some help with something you’ve been doing wrong? Email us at AmIDoingItWrong@HuffPost.com, and we might investigate the topic in an upcoming episode.

By entering your email and clicking Sign Up, you're agreeing to let us send you customized marketing messages about us and our advertising partners. You are also agreeing to our Terms of Service and Privacy Policy.