Whoever first uttered the famed proverb “Early to bed and early to rise, makes a man healthy, wealthy, and wise,” may have unwittingly revealed the secret to better sleep — and it’s not what you might think.

Whether you crawl in bed at 3 a.m. or flip the lights before the sun sets, the easiest way to improve your sleep is maintaining a consistent sleep schedule. That is, going to sleep and waking up the same time each day. By doing so, your body clock, or circadian rhythm, will program itself to be tired and alert at the right times.

But abnormal schedules throw that rhythm off all the time, leaving us feeling depleted and exhausted, even if we’re getting the recommended eight hours a night. (Think: pulling an all-nighter, traveling through time zones, or simply staying up too late because…Netflix.)

Adopt these habits to get your sleep schedule running like clockwork.

Avoid electronics in the bedroom

While we advocate sleeping with some tech, TVs, computers, and smartphones have no place in the bedroom. These electronics give off blue light, which prevents our brains from releasing melatonin, the sleep-regulating hormone that influences our circadian rhythm.

Nap at the right time

Napping may be the newest wellness trend, but it can also derail your sleep schedule if done incorrectly. To get the most out of your nap, aim for 20 to 30 minutes in the mid-afternoon around 3 p.m. Napping too late into the afternoon will make it harder to fall asleep that night, throwing off your body clock.

Wear yourself out

Like napping, when it comes to exercise, it’s all about timing. Working out increases your adrenaline and brain activity, making it harder to nod off; so, cap your workouts at least two hours before bed. If your schedule only allows for evening workouts, take a cold shower to lower your body temperature and heart rate, practice meditation and deep breathing, or use essential oils to soothe yourself to sleep.

Cut the caffeine

Coffee is great for a midday boost, but its effects can remain in your system for up to six hours. Not only can it reduce your total sleep time, it can also lessen the amount of deep sleep you’re getting. Avoid caffeine at least six hours before bed, and, if possible, find alternatives to cut caffeine intake throughout the day.

Keep it dark and cool at night

Since our body temperature drops before we snooze, keeping the thermostat between 60-67 degrees Fahrenheit helps prep our bodies for sleep. Our bodies are also programmed to sleep when it’s dark, so using heavy curtains or blackout shades will help you get better shut-eye.

Good sleep means getting more than a good night’s sleep — it means getting good sleep on a consistent basis. We can’t promise it will make you wealthier, but keeping a consistent sleep schedule will certainly make you healthier and wiser.