While coffee has many proven health benefits, some common coffee-drinking mistakes can interfere with your energy levels, sleep, hydration, and overall health. Making a few small changes to your typical coffee routine can help ensure you get the most health benefits out of your morning cup.

Drinking coffee too late in the day can impact your sleep by disrupting your body’s ability to fall asleep or stay asleep. That’s because the effects of caffeine, a natural stimulant in coffee that affects the central nervous system, can last for several hours.

Research has found that drinking coffee up to six hours before bedtime can disrupt sleep quality. Sleep is important for disease prevention, mood, focus, and immune function, so it’s recommended to stop drinking coffee at least six hours before bed to support optimal sleep.

“Try switching to decaffeinated coffee after 2:00 p.m. or whenever you typically experience an afternoon slump,” Melissa Prest, DCN, RDN, spokesperson for the Academy of Nutrition and Dietetics, tells Health.

Regular consumption of unfiltered coffee, such as French press, Turkish coffee, or espresso, can raise levels of LDL “bad” cholesterol.

Compared to filtered coffee, unfiltered coffee contains higher levels of diterpenes, in particular, kahweol and cafestol, which are linked to increased LDL blood cholesterol levels. High levels of LDL cholesterol have been shown to increase the risk of stroke and heart attack.

“When possible, opt for drip coffee made with a paper filter. Save unfiltered coffee for weekends or special occasions if you’re managing your cholesterol,” says Prest.

Overloading your cup of joe with added sugar or sweeteners can spike the total sugar content, which increases your risk of high blood pressure (hypertension) and chronic diseases such as heart disease, cancer, and diabetes.

Excess sugar also disrupts the balance of the gut microbiome and may also worsen symptoms of mental health conditions. Additionally, studies show that consuming excess amounts of added sugars contributes to weight gain and increases the risk of obesity.

Instead, enjoy your coffee black or sweeten it with a small amount of natural sweetener, such as raw honey, date syrup, stevia, or pure maple syrup.

To optimize your daily energy level, avoid drinking coffee first thing in the morning. Immediately drinking coffee upon waking can interfere with adenosine, a neurotransmitter that influences your body’s circadian rhythm (your body’s internal 24-hour clock) and sleep-wake cycle.

To combat this effect, try having your first cup of coffee 60 to 90 minutes after waking up, recommends Debbie Petitpain, MBA, RD, spokesperson for the Academy of Nutrition and Dietetics. “In the meantime, hydrate with water, get some natural light, and do a bit of movement to help your body wake up naturally. You may find that your coffee feels more effective—and that you need less of it—just by shifting the timing,” says Petitpain.

Some people drink coffee alone in place of a meal, whether for weight loss or as a personal preference. Coffee may be associated with weight loss and a total reduction in body fat, but it does not contain enough nutrients to be consumed as a meal replacement.

To reap the benefits of coffee, enjoy it after a meal, like breakfast, for metabolic benefits and better blood sugar control. For most people, consuming up to 400 milligrams (1-4 cups per day) of caffeine is safe.

“Instead of coffee for an afternoon boost, try having a snack with protein and fiber that provides true energy and helps stabilize blood sugar. Pair it with a glass of water and perhaps electrolytes. The combo of nutrients and hydration will provide energy versus the stimulant effect of coffee that may be working against you,” says Keri Glassman, MS, RDN, CDN, and founder of Nutritious Life and Nutritious Life Studio.