system
Given the following post, respond as if you're commenting on Reddit:
human
What happens to our pupils when we sleep?

Do they dilate bigger or smaller?
gpt
(Almost) doctor here. 
The pupils, as well as our whole body respond to sympatic ("active mode" or fight/flight response) and parasympatic ("rest & digest mode", i.e. low stress situations) innervation. 
When we are awake, and in the fight/flight mode, your heart rate and your blood pressure increase to take on the demands of what your body is about to have to do. Your hands and feet will sweat in to increase your grip. Your pupils dilate in order to take in as much visual detail as possible so you won't miss anything.

When we sleep, our parasympatic system kicks in. Our blood pressure and heart rate decline, and our pupils become smaller (miosis) because they will not need to see anything because they will be closed for a long period of time.

Fun fact: adrenaline is a sympatic activator (or sympathicomimetic, as is MDMA, cocaine or amphetamine, thats why people who use them have major pupils (mydriasis). Opiates are more parasympatic, and so heroin users will have small pupils (so called pinpoint pupils). We look for these things when someone is brought in and is intoxicated and is not able to express himself.

Disclaimer: really late here and possibly not 100% complete answer but this is a grossly simplified answer.