Usually, if your dog sees the crate as a good thing, it becomes their own sort of "bedroom". Their place of privacy.

Catnapper pretty much explained your question.