Sleepiness and fatigue are frequent problems in railway transportation with occasional monotony and irregular shift schedules. This study aimed at (1) studying the prevalence of severe sleepiness in shifts and (2) examining which shift and sleep-related factors were associated with the occurrence of severe sleepiness in an irregular shift system. A total of 126 randomly selected male train drivers (Tdrs) and 104 railway traffic controllers (Tcos) were investigated using questionnaires and sleep-wake diaries. A sleep diary was used to collect information on sleepiness at work and sleeping times during the 21 consecutive days of the study. The prevalence of severe sleepiness at work (i.e. Karolinska Sleepiness Scale 7 or higher) was modelled by a logistic regression analysis for repeated measurements (GEE) using different shift schedule related factors and sleep length as explanatory variables. Severe sleepiness was reported in 49% (Tdrs) and 50% (Tcos) of the night shifts and in 20% (Tdrs) and 15% (Tcos) of the morning shifts. The odds ratios showed that the risk for severe sleepiness was 6-14 times higher in the night shift and about twice as high in the morning shift compared with the day shift. Age affected the two occupational samples differently: with Tdrs increased age was associated with an additional 8% reduction of risk for severe sleepiness for each year of age, while the Tcos did not show any age dependency. Shift length increased the risk by 15% for each hour of the shift and main sleep period decreased the risk by 15% for each hour of the main sleep. The risk of severe sleepiness was not consistently related to the time-off period before the shifts. The results indicate that adjustments for shift timing, length and off-duty time, in addition to actions aiming at extending the main sleep period, would probably decrease severe sleepiness in railway transportation.