For many U.S. college students, final exams are quickly approaching, which means late nights and sometimes all-nighters to cram in extra hours of studying. But keeping those eyes propped open for so many hours can do more harm than good.

“The whole purpose of sleep is to consolidate memories,” said S. Ausim Azizi, professor of neurology at Temple’s Katz School of Medicine. While short-term memories may not be affected by all-nighters, the brain needs sleep for long-term learning.

A good night’s rest is the best thing for academic success, said Azizi.

But some students need a nudge to get the extra sack time.

A Baylor University professor bribed his students with extra credit if they would sleep eight hours a night while proving it by wearing a Fitbit-like device to collect data on sleep. Twenty-four students took up the challenge and outperformed their classmates who opted not to participate by nearly five points on the final exam. The results of the study were published last year in the journal The Teaching of Psychology.

Those students with health issues such as diabetes or hypertension should be especially diligent about getting a regular night’s sleep, Azizi said. Lack of sleep can cause metabolic changes such as altered glucose regulation.

Taking Adderall, the medication used for attention deficit hyperactivity disorder, to help cram before finals is “a very bad practice,” said Azizi. While the brain may be wide awake, it will not be useful in forming consolidated memories. In addition, the stimulant (Adderall contains amphetamine) will cause the heart to pump faster, he said.

If you do stay up late, try to make up for lost sleep as soon as possible.

“You cannot pull all-nighters and think you can catch up on sleep on the weekend,” Azizi said.

That was not news to Haverford College student Elom Tettey-Tamaklo, 22, of Ghana, who recently pulled a few all-nighters in a row to finish his senior thesis.

“I didn’t sleep for days on end,” he said. “There was just so much to do and so little time.”

Tettey-Tamaklo, a political science major who works four jobs on the side, said that during his all-nighters, he reached a point where his body and mind were not working as effectively as normal. Writing the conclusion to his thesis should have been easier than it was, he said.

“I think it was because of sleep deprivation,” he said.

Carter Patterson, 21, a junior at Haverford College, tries to keep the same sleep/wake schedule and get seven hours of sleep. But on those nights that he does stay up later, there is a noticeable impact in how he feels.

“I feel like I put other things before sleep — like school,” said Patterson, a math and physics major.

He tries to make up for it with a nap, he said.

Yet experts say napping can have a negative impact on the next night’s sleep, and advise that if you must nap, keep it short.

The problem starts before college. While American college students manage to get about the same amount of sleep as their counterparts abroad, U.S. high school students get 15 minutes less sleep each night and wake up in worse moods, according to the Sleep Cycle Institute.

The reason is the earlier start time for U.S. high schools, according to the institute’s report, which compiled data from its sleep app for more than 172,000 teens ages 15 to 18, and more than 292,000 college students ages 19 to 22 in the U.S. and abroad.

And don’t think for a minute that shorting sleep affects only students.

A study in Sleep Health, the journal of the National Sleep Foundation, found that adults who get just 16 minutes of sleep less than they need will see it in their job performance.

University of South Florida researchers surveyed 130 healthy information technology workers who have at least one school-age child. The workers reported more cognitive issues when they slept less, which led to higher stress levels.

The findings point to why workplaces should make more effort to promote sleep, said lead author Soomi Lee, an assistant professor in the School of Aging Studies, in a statement.

“Good sleepers may be better performers at work due to greater ability to stay focused and on-task with fewer errors and interpersonal conflicts,” said Lee.

Best practices for a good night’s sleep before finals (or any time) according to Azizi and the Sleep Institute:

  • Get about seven hours sleep in every 24-hour period.
  • Try to keep the same regular sleep and wake hours.
  • Do not overeat. Eat healthy meals and skip sugar.
  • Stay away from stimulants like caffeine and refrain from drinking alcohol.
  • Drink plenty of water.
  • Avoid extraneous screen time.