This study investigated efficiency of switching between different tasks in 12 male participants (19-30 years) during 40 h of constant wakefulness. As index of task-switching efficiency, switch costs in reaction time were assessed every 3 h under controlled behavioural and environmental conditions. Overall reaction times and switch costs showed a temporal pattern consistent with the assumption of a combined influence of a sleep homeostatic and a circadian process. An additional analysis indicated that the variation in switch costs could not be attributed to interference of the current task with persisting activation from preceding tasks. We therefore conclude that sleep loss and the circadian system affect the ability to prepare the current task rather than automatic processing of irrelevant stimulus information.