Sleeping/closing the eyes in the cage could be a sign of the lighting being incorrect, too intense on his eyes, etc. Out of the cage tells me something else is going on. It could be anything from parasites to dehydration to vitamin A deficiency, there are many different things that can cause this. In general, as the others have said it is not a good sign. Chameleons do not take naps. They sleep at night always. I suggest if it continues, to find a way to get the little guy to a vet.