Investigators looked at crashes between 2008 and 2011 in New South Wales and Western Australia that involved vehicles of at least 12 tonnes.
They compared 530 drivers who had crashed while on a long trip with 517 drivers who had not had an accident in the previous 12 months.
After factoring in age, sleep patterns and breaks taken during the trip, the researchers found that drivers who consumed caffeine to help them stay awake were 63 percent less likely to crash than those who did not take a caffeinated substance.
Taking caffeine "should be considered as an effective adjunct strategy" for keeping alert while driving, but breaks, sleep and regular exercise are also essential, said the study, published by the British Medical Journal (BMJ) on Tuesday.
The paper said 43 percent of drivers in the survey reported using caffeine to stay awake; only three percent reported using illegal stimulants such as amphetamine.