Attention Deficit Hyperactivity Disorder (ADHD) and Autism Spectrum Disorder (ASD) are often comorbid and share behavioural-cognitive abnormalities in sustained attention. A key question is whether this shared cognitive phenotype is based on common or different underlying pathophysiologies. To elucidate this question, we compared 20 boys with ADHD to 20 age and IQ matched ASD and 20 healthy boys using functional magnetic resonance imaging (fMRI) during a parametrically modulated vigilance task with a progressively increasing load of sustained attention. ADHD and ASD boys had significantly reduced activation relative to controls in bilateral striato-thalamic regions, left dorsolateral prefrontal cortex (DLPFC) and superior parietal cortex. Both groups also displayed significantly increased precuneus activation relative to controls. Precuneus was negatively correlated with the DLPFC activation, and progressively more deactivated with increasing attention load in controls, but not patients, suggesting problems with deactivation of a task-related default mode network in both disorders. However, left DLPFC underactivation was significantly more pronounced in ADHD relative to ASD boys, which furthermore was associated with sustained performance measures that were only impaired in ADHD patients. ASD boys, on the other hand, had disorder-specific enhanced cerebellar activation relative to both ADHD and control boys, presumably reflecting compensation. The findings show that ADHD and ASD boys have both shared and disorder-specific abnormalities in brain function during sustained attention. Shared deficits were in fronto-striato-parietal activation and default mode suppression. Differences were a more severe DLPFC dysfunction in ADHD and a disorder-specific fronto-striato-cerebellar dysregulation in ASD.