Overnight workers have now been given the go-ahead to grab a midnight snack by scientists.
In the first study of its kind, University of South Australia researchers investigated how eating patterns can affect performance at work.
They found a snack was the best way to fuel those working a night shift, rather than a heavy meal, such as a sandwich or curry.
Their reaction times were quicker, most likely because a large meal can make us feel exceptionally sleepy halfway through the night, the scientists said.
Participants in the study were given cheese and crackers and pretzels.
Millions of shift workers complain of their diet being ruined because they have got used to eating throughout the night.
Research shows nurses - who regularly work late shifts - are more likely to be obese, possibly due to the body clock being disrupted or bad food choices.
Lead researcher and PhD candidate Charlotte Gupta said many work industries are increasingly relying on employees to work round the clock.
She said: 'We know many night shift workers eat on shift to help them stay awake.
'But until now, no research has shown whether this is good or bad for their health and performance.
'This is the first study to investigate how workers feel and perform after eating different amounts of food.'
Over the course of a week, 44 healthy participants, who were not night shift workers, were split into three eating conditions, according to the study published in the journal Nutrients.
They were observed in a laboratory where researchers made them stay awake overnight and sleep during the day.
All groups ate enough calories during the 24-hour period, ranging from 1900 to 2,600 calories - but their meal times varied.
One group was given a big meal at midnight and one group was given a snack at midnight, such as cheese and crackers with pretzels, or an apple with a muesli bar.
The midnight meal made up 30 per cent of the participants daily calories and the snack was just 10 per cent.
One group wasn't given any food at all, having their dinner around 10pm, breakfast at 3am, and snacks throughout the day.
Ms Gupta said: 'We had them do a lot of performance tests and give us ratings on how they were feeling.'
Participants also rated their level of hunger, gut reaction and sleepiness after eating at midnight.
Ms Gupta said participants who had a snack just after midnight felt more awake than the other two groups, were the most satisfied with the amount of food and performed best in tests.
Ms Gupta said: 'They were reacting faster. We had them do a driving simulator and they were driving safer. So, there were less crashes and they were staying in the speed limit with that small snack, opposed to the big meal.
'Those that didn't have any food performed better and more alert than those that had the big meal but the snack group still felt and performed the best.
'The findings will inform the most strategic eating patterns on-shift and can hopefully contribute to more alert and better performing workers.'
Despite the meal causing drowsiness, the researchers do not advise skipping meal times and eating snacks instead during the day.
Ms Gupta said: 'We find there is always that post lunch lull in alertness, which is just part of our circadian rhythm. We just feel sleepier at that time of day.
'Having a really big heavy meal can make us feel sleepier, but the body is also primed to be digesting food and it wants to be digesting food and digesting it during the day.
'But at night when our body isn't fine to be digesting food that's when a snack is better.'
The circadian rhythm is a 24-hour cycle, often called the 'body clock', that regulates people's sleep, eating, body temperature and digestion.
Ms Gupta said research should now look into the best snacks for shift workers.
She added: 'We gave people a muesli bar and an apple, which is a fairly healthy snack, but we know that many shift workers are limited in what they can buy, or are getting food from vending machines.'
Crisps, chocolate, biscuits and energy drinks are a common choice to keep workers going through the night.
Ms Gupta said: 'There's also a craving during the middle of the night, when you're working a hard night shift, for chocolate or something a bit more exciting to eat. So, we want to know what the different types of snack do in how people perform during the night.'
One in four nurses are obese according to a study by Edinburgh Napier University and London South Bank University in 2017.
Although researchers weren't able to clarify the reasons behind the high levels of obesity seen in healthcare staff, they suggested it may be the result of disruptive work shifts.
Nurses have also reported increased rates of irritable bowel syndrome, while flight attendants who eat during the night suffer more stomach aches, bloating, disturbed appetite, diarrhea, and constipation, Ms Gupta and colleagues report.