We have all felt sluggish, irritable, hungry, or unable to focus during the day. Sleep is a luxury, you tell yourself. I’ll catch some zzz’s this weekend. But, can you really repay days, weeks or even years of sleep debt?

While you may be used to compensating with coffee and energy drinks to feel more alert, there’s not enough caffeine in the world to replace the restorative benefits of a good night’s sleep.

Maintaining a consistent sleeping and waking schedule also helps you feel more rested throughout the day and makes falling and staying asleep easier.

If you’ve slept fewer than seven hours per night for years, it may take a few weeks to repay your sleep debt.

Why is sleep so important?

Sleep is a process that your body craves and needs to function, just like breathing, eating, and drinking. Insufficient sleep or “sleep deprivation” leads to short- and long-term problems.

“While awake, your brain builds up harmful waste products of metabolism, which are cleared only while you sleep,” explains Dr. Alejandro Chediak, a sleep expert with the University of Miami Health System. “Sleep loss allows the buildup of brain waste and interferes with basic brain functions.”

The circadian rhythm, which is your body’s clock, regulates not only your level of sleepiness but your body temperature, blood pressure, digestive enzymes and various hormones. With sleep loss and irregular sleep schedules—even by just an hour or two per night—your circadian clock gets off track.

Signs of sleep loss:

Excessive daytime sleepiness

Inability to mentally focus

Difficulty learning new things / processing information

Bodily fatigue

Emotional instability / crankiness

Lack of coordination

Compromised motor and driving skills / reaction time

Lack of energy or stamina for exercise

Increased hunger and cravings for sugary foods and carbohydrates (which can lead to weight gain)

If you get 39 or fewer hours of sleep in one week, you need to get three to four extra hours of sleep over the course of a weekend plus one to two extra hours of sleep every night for the following week to pay off that sleep debt.

If you’ve slept fewer than seven hours per night for years, it may take a few weeks to repay your sleep debt. Dr. Chediak recommends that people in this situation “begin by sleeping as long as you can.” At first, you might find yourself sleeping for extended periods of time. But, “the brain will sleep only if it needs to,” he says. Allowing your schedule and body to gain significant nighttime sleep will eventually enable you to settle your sleep debt.

“You’ll know when your sleep debt is paid off when you awake feeling refreshed and are no longer excessively sleepy during the day,” said Dr. Chediak.

If you backslide with some sleepless nights, try to use your weekends and 20-to-30-minute naps to catch up. Once you’ve repaid your sleep debt, you need to get enough sleep each night to continue the physical and mental health benefits only sleep can provide.