This study investigated variations in heart rate variability (HRV) as a function of cognitive demands. Participants completed an execution condition including the psychomotor vigilance task, a working memory task and a duration discrimination task. The control condition consisted of oddball versions (participants had to detect the rare event) of the tasks from the execution condition, designed to control for the effect of the task parameters (stimulus duration and stimulus rate) on HRV. The NASA-TLX questionnaire was used as a subjective measure of cognitive workload across tasks and conditions. Three major findings emerged from this study. First, HRV varied as a function of task demands (with the lowest values in the working memory task). Second, and crucially, we found similar HRV values when comparing each of the tasks with its oddball control equivalent, and a significant decrement in HRV as a function of time-on-task. Finally, the NASA-TLX results showed larger cognitive workload in the execution condition than in the oddball control condition, and scores variations as a function of task. Taken together, our results suggest that HRV is highly sensitive to overall demands of sustained attention over and above the influence of other cognitive processes suggested by previous literature. In addition, our study highlights a potential dissociation between objective and subjective measures of mental workload, with important implications in applied settings.