A new study from Dr. Tim Bono of the Washington University in St. Louis has found that students who get a good night’s sleep earn better grades and feel a stronger sense of well-being, according to Medical Xpress.

Dr. Bono said, “You can’t skimp on sleep one night and expect you will ‘catch up’ the next.”

The study, published recently in Psychology, Health & Medicine, tracked the sleeping habits of nearly 100 Washington University first-year students during their first semester on campus.

On average, the students who reported the most stable, consistent sleep patterns got a GPA of 3.66, while the students who reported the most variable sleep earned a GPA of 3.21.

In addition, the study found that students with regular sleep patterns reported higher levels of well-being.

Dr. Bono explained, “When asked to identify factors affecting their academic performance, sleep difficulty was identified more often than homesickness, roommate difficulties, health problems, even depression,” adding even seven to eight hours of sleep a night is optimal.

“It all comes back to our circadian rhythm—that comes from the Latin for circa, meaning around, and diem, meaning day,” he said. “It doesn’t matter what the clock on your desk says. Your body has its own internal clock. An erratic sleep cycle is inconsistent with the body’s natural cycles.”

“As homework and activities pile up, sleep is often the first to go,” Dr. Bono added. “And that’s a problem because when we go to sleep, the brain goes to work. During sleep, the brain transfers information you have learned to storage regions like the hippocampus so you can later retrieve that material.”

Memory consolidation typically occurs during periods of rapid-eye-movement (REM) sleep, which grow longer as the night goes on. So, poor sleep cheats the brains of some of the most productive periods of sleep.

Dr. Bono said, “That’s why I tell my advisees that all-nighters are not only unproductive, they’re counterproductive.” He advises his students to set a sleep schedule.

He said he personally uses a sleep app to make sure he gets to bed at the same time every night, according to Medical Xpress.

Dr. Bono also advises his students to stop scrolling an hour before sleep as the light that emanates from devices suppresses the release of melatonin, a sleep hormone.

He said, “When a student says they’ve only slept five hours, the response is often, ‘Well, I only slept four.’ “The response should be, ‘What are you doing to take care of yourself?’”