It's scary season at university. For lots of students, exams are round the corner, while looming dissertation deadlines top the panic poll for others.

After months of labour, putting the finishing touches to a project that represents the culmination of your undergraduate education can turn into a caffeine-fuelled ordeal. Especially when things go horribly, horribly wrong.

I still have nightmares about my final meeting with my supervisor, three days before submission. She casually informed me that all the work I'd done in the past three months had been a waste of time. The error was minor, but 20 pages had to be consigned to the garbage bin. I had 72 hours to do what I could to repair the damage...

All-nighters are pretty much synonymous with student lifestyles. But frequent sleep deprivation over four years can have drastic long-term consequences, unleashing a neurological cycle of degeneration.

Susan Redline, a professor of sleep medicine in Boston, has found links between sleep deprivation and the onset of neuropsychiatric disorders such as anxiety and bipolar depression.

Over time, forcing the body to stay awake also affects blood pressure and levels of inflammation, resulting in an increased susceptibility to heart disease and cancer.

So those are the long-term issues. But what about the immediate consequences?

Recent research at Harvard and Berkeley has just revealed a very dangerous side effect of pulling an all-nighter – short term euphoria.

After missing a night's sleep, the mesolimbic pathway (the neural circuit that controls pleasure and reward) is strongly stimulated. The process is driven by a chemical called dopamine.

The higher dopamine levels that result from your sleepless night may mean you enjoy a boost in motivation, positivity, even sex drive. You may think that sounds good; unfortunately you'd be wrong.

Not only are these feelings brief, but the dopamine surge also encourages addiction and impulsive behaviour. The regions of the brain responsible for planning and evaluating decisions simply shut down once deprived of sleep, meaning that you're inclined to be overly optimistic and happy to take risks.

Some research indicates that if the mesolimbic pathway is frequently over-stimulated by sleep deprivation, there could be permanent brain damage. This is because of the brain's "neural plasticity" – which means its ability to adapt to new situations. When it's forced to operate in a different state on a regular basis, it permanently alters itself.

And don't even think of pulling an all-nighter before an exam: researchers say that does more harm than good. Last-minute cramming refuses to sink in, because the consolidation of memories occurs during deep sleep.

Not only that, but all-nighters actually weaken the coupling between the structures responsible for episodic memory, meaning that when you try to recall specific events, the circuitry simply isn't up to it.

• A version of this article was first published on Guardian Students on 9 October 2012.