You cycle through four different sleep stages, each of which shows up as a different pattern on the EEG. One stage of sleep, called rapid eye movement or REM sleep, is when dreams typically occur.
If I were looking at you in a sleep lab, I could actually look at your EEG recordings and I could look at how much stage three, four and REM sleep you get because that really is the determinant of ...