The electroencephalogram (EEG) is a medical test used to measure the electrical activity of the brain. A number of electrodes are applied to your scalp. EEG can help diagnose a number of conditions including epilepsy, sleep disorders and brain tumours.