Morgan is a professor of psychology and director of the clinical sleep research unit at the University of Loughborough in the UK.
Although sleep scientists do not advocate working through the night, Professor Morgan says there are a few benefits.
"There are fewer distractions at night," he said. "You can control your environment."
Advisable or not, all-nighters are part of life for many of us, whether due to heavy workloads, the demands of international working practices or our own habits.
Sixty percent of students surveyed by researchers at St Lawrence University in New York stayed awake all night at least once since entering the school, according to a 2008 study. The practice isn’t limited to students cramming for exams. A 2012 survey commissioned for the UK teachers' magazine TES Connect found that 70% of 1,600 primary school teachers questioned had stayed up all night to complete work at least once in the previous three months.
All-night study spaces are a feature of many universities today, including reading room facilities at the University of Chicago in the US and the University of Bristol 24-hour Computer Room in the UK.
Asleep on the dinner plate
Paul Haswell, a Hong Kong-based partner at international law firm Pinsent Masons, is not a fan of all-nighters. Yet Haswell, a specialist in technology, employment and commercial law, finds they are sometimes unavoidable.
"I do not think that me or my team are as effective if they are sleep deprived," Haswell said. "I’d rather have a well-rested, efficient and stress-free team than one which is fighting to stay awake."
Staying awake all night can also play havoc with your personal life, as Haswell discovered on a dinner date the evening after he had pulled an all-nighter as a junior lawyer.
"I was absolutely exhausted, but couldn’t dare cancel the date as I’d been planning it for months," said Haswell. "I ended up falling asleep during the starter. Woke up with my head on the table and a waiter explaining that my date had left in disgust. I never saw the lady in question again!"
Scientific research tells us that poor sleeping habits are bad for our health and well being.
The St Lawrence University study found that the marks for students who had never pulled an all-nighter were 7% higher than the marks for students who did stay up all night.
People who sleep fewer than six hours a night are more likely to develop impaired fasting glucose, a condition which precedes Type 2 diabetes, than people who sleep for longer, according to researchers at New York’s University at Buffalo in 2009.
And a sleepless night can lead to short-term euphoria and impaired decision making ability, according to scientists at the University of California, Berkeley and Harvard Medical School in 2011.
"Pulling an all-nighter is risky on several levels," said Dr Charles Czeisler, Baldino Professor of Sleep at Harvard Medical School. "You are also at acutely increased risk of causing an air or motor vehicle accident should you fly or drive after being awake all night."
Despite the risks associated with all-nighters, many of us do it. So what can we do to stay productive through the small hours and still function the next day? Here are some tips from the experts.
Czeisler advises having a snooze once you realise you will not be going to bed that night.
"If we take a mid-afternoon nap, the decrease in performance which normally occurs as we work on will be much less," said Czeisler.
Maintaining good, regular sleeping habits most of the time can help us cope with an all-nighter, said Morgan.
"Do a bit of 'sleep banking' and get the amount of sleep you need most nights,” Morgan said. “Don't allow unnecessary sleep debts to accrue in your life, and this will help when you do have to work through the night."
"Protein keeps us alert," advises Paula Mee, a dietician, nutrition consultant and broadcaster based in Dublin. "So the evening before you are going to stay up all night have a meal which is rich in protein, for example a chicken breast or a salmon cutlet. Too many carbohydrates can make us sleepy."
"You do not need to have another full meal during the night, our bodies have reserves for events like this," said Mee. "But mid-way through the night you could have a protein snack, perhaps some nuts and seeds, to help keep you alert."
Work in bright light
"Light is a signal of wakefulness for our biological clock and tells us that it is time to be awake and active," said Docteur Joëlle Adrien, neurobiologist and Research Director at l’Institut national de la santé et de la recherche médicale (INSERM) in Paris, France's national institute of health and medical research.
But be sure the light is the right colour. "Research shows a blue-tinted light will wake you up best, such as a blue-LED light," Adrien said. "Yellow light is not good for staying awake. It relaxes us, so avoid it if you want to work through the night."
Plan your night-shift tasks
Our cognitive ability will diminish as we work through the night, leaving us less able to perform tasks which require computing information, Morgan said.
"Divide your tasks in to two categories: cognitive tasks, which require thinking,and computing, and other tasks which are more routine, such as formatting your work," said Morgan. "Do the cognitive tasks first. You want your facts to be right."
"The more routine and pedestrian tasks should be done later, formatting your document for example," Morgan said.
Caffeine reduces the effects of adenosine, a chemical that humans produce which makes us feel tired.
"Use caffeine strategically," Czeisler said. He advises drinking a cup of coffee at hourly intervals throughout the night.
Our body temperature dips to its lowest around 03:00 to 04:00. "You don't want to be distracted by being cold," Morgan said. "So make sure your environment is comfortably warm. I always have a fleece handy."
Take a morning-after nap
"Once you have finished your task, say around 08:00, send off the email and then go to bed for 90 to 100 minutes, which is long enough to allow us to have one full sleep cycle," Morgan said. "That should be enough to keep you functioning throughout the day, but not for driving, so never drive the day after an all-nighter."
And go to bed early that evening, he added. “You should be able to get back into your normal routine fairly easily," he said.
Just say no.....
"Tell your boss it is not reasonable to work through the night," is the advice of Adrien when it comes to an unexpected all-nighter. "Sleep deprivation has a very strong impact on your health. Of course, you may need to be diplomatic, and say OK, just this once, but not again. Just tell your boss no."
Do you have tips for pulling an all-nighter? Share your thoughts with BBC Capital on Twitter @BBC_Capital or join the conversation about this or any other Capital story on Facebook: BBC Capital on Facebook.