But University of Otago professor Jennie Connor warned caffeine, while effective for short amounts of time, was not a solution to fatigue.
The research, published in the British Medical Journal, was undertaken in Australia between 2008 and 2011.
It compared 530 long-distance heavy vehicle drivers who had crashed their vehicle on a long distance trip in the preceding 12 months, with 517 such drivers who had not crashed.
Researchers linked drinking coffee to stay awake with a 63% lower crash risk.
''Long-distance commercial drivers who consume caffeinated substances such as coffee or energy drinks, to stay awake while driving, are significantly less likely to crash than those who do not, even though they drive longer distances and sleep less,'' researchers said.
More than 40% of drivers reported consuming substances containing caffeine for the express purpose of staying awake.
Lead researcher Lisa Sharwood, of the University of Sydney, said it suggested drivers were adapting their behaviour to manage fatigue.
''This may seem effective in enhancing their alertness, but it should be considered carefully in the context of a safe and healthy fatigue management strategy. Energy drinks and coffee certainly don't replace the need for sleep,'' she said.
That notion was shared by Prof Connor, head of preventive and social medicine at the University of Otago's Dunedin School of Medicine.
She had previously researched driver sleepiness and crashes in New Zealand, and said although caffeine was one of the most widely used substances by drivers to stay alert, its effect was short-lived.
''It has to be a substantial amount of caffeine to make a difference to alertness - about two cups of good coffee - and it wears off fairly quickly, after about 45 minutes. To make a significant difference to your ability to drive when sleepy, you need more than a cup of coffee.''
Drowsy drivers were impaired, like drunk drivers, even if they did not fall asleep at the wheel.
''That is to some extent reversible by caffeine for a short period of time. It will provide you with a little bit of extra alertness but it's not the answer because an hour later you're back in the same situation,'' Prof Connor said.