A new study identifies four key factors that make a difference in waking up well in the morning – powering through to lunchtime alert and refreshed at one end of the scale, or fighting through grogginess and multiple taps of the snooze button at the other.

The team behind the study says these factors, independent of the genetics that an individual was born with, can all be modified to some extent to ensure we get off to a better start in the mornings.

"Why is it that we human beings fluctuate in our alertness from one day to the next?" asked the team of researchers led by neuroscientist and sleep researcher Raphael Vallat of the University of California (UC) Berkeley in their published paper.

"Why do we wake one morning feeling alert, yet another morning, flounder in that level of alertness upon awakening?"

A total of 833 people participated in the study, most of whom were twins (this helped the researchers filter out variations due to genetics). Over two weeks, food intake, physical activity, sleep patterns, and glucose levels were recorded, while the volunteers also rated their alertness at several points in the day.

The first factor that matters is sleep profile: the duration, timing, and efficiency of sleep overnight. Sleeping longer and waking up later than normal were both associated with better morning alertness.

The second factor was the amount of exercise people got the day before. Higher levels of movement in the day (as well as less physical activity at night) were associated with more continuous and less disrupted sleep, which in turn predicted increased alertness from the participants in the morning.

Thirdly, there was breakfast. Morning meals with more carbohydrates led to better alertness levels, while more protein had the opposite effect. By keeping the calories in the supplied meals the same, the researchers could focus on the nutritional content of what was being eaten.

Lastly, a surge in blood sugar levels after breakfast – tested using a pure glucose liquid drink – was associated with reduced alertness. A high-carb breakfast improved alertness, providing a lower blood glucose response than the pure glucose drink.

In other words, how the body processes food is important, and too much sugar leads to a sugar crash rather than a sugar rush in the morning.

Other factors at play regarding daily alertness included the mood and the age of the volunteers, though these aren't quite as manageable as what time you go to bed and what you have for breakfast.

"Our results reveal a set of key factors associated with alertness that are, for the most part, not fixed. Instead, the majority of factors associated with alertness are modifiable, and therefore permissive to behavioral intervention," write Vallat and colleagues.

The team is keen to investigate some of the mechanisms behind these associations to gather more accurate data; the participants reported their levels of alertness, which weren't measured using any scientific instruments.

That said, in addition to reporting their daily behaviors, participants ate standardized meals and wore an accelerometer wristwatch (to measure sleep and activity) and a continuous glucose monitor (to measure blood sugar levels after meals), which is better than most studies that rely on questionnaires alone.

Another challenge for future studies will be determining how and why sleeping longer and sleeping later, relative to that person's typical norm, boosts morning alertness – at least in this study. We know from other research that oversleeping can also impact wellbeing.

Improvements in sleep quality affect so many other areas of our lives, not least the safety of those who work in jobs where mistakes can be fatal, including firefighters, nurses, and airplane pilots.

"This question is scientifically elemental but also of societal relevance considering that the failure to sustain alertness throughout the day is a major causal factor of road traffic and occupational accidents, accounting for thousands of deaths every year," write the researchers.

"Moreover, it is estimated that insufficient sleep leading to impaired daytime alertness is responsible for significant work-related loss of productivity, greater healthcare utilization, and work absenteeism."

The research has been published in Nature Communications.