The scientific study of sleep really began in the 1950s, as researchers applied new techniques of physiological recording to sleep research.
Scientists discovered that aspects of the body's activity could be directly measured by mechanical devices that produce electrical signals in response to physiological fluctuations.
These signals could be fed into a physiograph, which amplified the signals and recorded them for later analysis.
In this way researchers could record changes in heart rate, breathing rate, and muscle tension during a night of sleep.
But the real breakthrough came when researchers discovered that the brain itself gives off weak electrical signals,
generated by the simultaneous firing of millions of neurons within the brain.
Electrodes placed on the scalp can detect these signals.
When the signals are amplified and fed into a special type of physiograph called an electroencephalograph (EEG),
scientists can obtain a permanent record of the activity of the brain across an entire night of sleep.
Note that this record doesn't tell us what the person is thinking, or what any individual neuron is doing, but merely how active the brain is at each moment.