Psychologists learn about what happens when we sleep by collecting EEG and other measurements from research volunteers while they sleep in sleep laboratories, like this one.
Laif/Redux