Arousal is largely controlled by the ascending arousal system of the hypothalamus and brainstem, which projects to the corticothalamic system responsible for electroencephalographic (EEG) signatures of sleep. Quantitative physiologically based modelling of brainstem dynamics theory is described here, using realistic parameters, and links to EEG are outlined. Verification against a wide range of experimental data is described, including arousal dynamics under normal conditions, sleep deprivation, stimuli, stimulants and jetlag, plus key features of wake and sleep EEGs.