While your body is technically shedding dead skin cells all the time, it sheds more and repairs more during sleep. The metabolic rate of skin increases during sleep, causing that natural result (incidentally, this is why you should wash your sheets with a certain frequency no matter what, they are technically filled with dead skin cells).