A good quality and amount of sleep are fundamental to preserve cognition and affect. New evidence also indicates that poor sleep is detrimental for brain myelination. In this study, we test the hypothesis that sleep quality and/or quantity relate to variability in cognitive and emotional function via the mediating effect of inter-individuals differences in proxy neuroimaging measures of white-matter integrity and intra-cortical myelination. By employing a demographically and neuropsychologically well-characterized sample of healthy people drawn from the Human Connectome Project (n=974), we found that quality and amount of sleep were only marginally linked to cognitive performance. In contrast, poor quality and short sleep increased negative affect (i.e., anger, fear, and perceived stress) and reduced life satisfaction and positive emotionality. At the brain level, poorer sleep quality and shorter sleep duration related to lower intra-cortical myelin in the mid-posterior cingulate cortex (p=0.038), middle temporal cortex (p=0.024), and anterior orbitofrontal cortex (OFC, p=0.034) but did not significantly affect different measures of white-matter integrity. Finally, lower intra-cortical myelin in the OFC mediated the association between poor sleep quality and negative emotionality (p<0.05). We conclude that intra-cortical myelination is an important mediator of the negative consequences of poor sleep on affective behaviour.