Without getting too technical or with the use of scientific languages here, colorations depend solely on a variant of circumstances, moods, temperature, and even health. There are two basically related factors that change colorations, 1) Internal factors and 2) External factors. Most of these we already know, such as getting dark when trying to absorb the heat or the sunlight for warmth. In contrast, showing light colors to reflect the heat and sun from their bodies in order to cool down. These are examples of external factors.
We also know that coloration variations change depending upon danger, mating colorations, and even mood, among others. Calm chameleons show "relaxed" colorations which may be duller in color. Their "fired" colors are exhibited when they feel under stress, the need to protect themselves, and/or territory, or even when trying to impress a female for mating. Females will change their colorations depending upon their hormonal status (gravid vs. receptive to mating). These are examples of internal factors.
Health is another factor that can effect coloration of chameleons. A sick or unhealthy chameleon will tend to show pale colorations and not be as vibrant as their energy level to produce these colorations may be too low. A very healthy chameleon in contrast can change to very vibrant colorations very quickly.
The question you are asking about sleeping colorations have to do directly with the time of day. At night, chameleons will show pale colorations as they are not using their energy, which will show their pale coloration variations they have in their bodily genetics. Then throughout the day, when awake, they change their colorations due to the external and internal factors that cause their energy to display colorations as circumstances demand from them (stress, temperature, hormones, calmness, mood, etc.).
Rather fascinating stuff isn't it?
