Its not just a case of getting enough sleep, when it got busy ( wheat season in Vic) you would have the 11 hours off as regulations state, trouble is that was exactly what you got, knock of at 17:11 (5:11pm) and you would be starting the next shift at 04:11, then work maybe 15 hours and knock off at 19:15 (7:15pm), start again at 06:15 work in the yard so only 7.5 hours, so knock off at 13:45 (1:15pm), start again at 00:15, finish say 10:00, so the next start would be 21:00 (9:00 pm) and so it would continue for about six months with a good harvest, you try sleeping at a different time each and every day.
While the above has changed a lot nowadays the shifts are still irregular and if anyone on a regular shift roster thinks they have it hard sleep wise try the above, vigilance control systems are on the loco's because the crew DO drift off to sleep without them.
The crews that are involved in collisions due to falling to sleep are only the ones that fell to sleep at the wrong time, all railways have this problem, and there is no answer.
Place your self in a situation where there is nothing to do other than look out for signals every now and then plus the odd road crossing, now have the drone of a diesel revving at a constant rate that also causes your seat to vibrate in a relaxing manner, add to that mix a nice warm cabin, see how long it is before your mind starts to drift, followed by you falling asleep without even realizing it
Cheers David