Ideally, you should take your dentures out anytime you plan to be asleep for several hours at a time. This is because you likely wear your denture during most of your waking hours, so nighttime is a good opportunity to give your mouth a break from your denture.
Additionally, your mouth tends to dry out when you sleep, and this can foster the growth of harmful bacteria on your denture and remaining teeth. On occasion, you may forget to remove your denture before bed, or you may choose to leave it in overnight for social reasons, but try to otherwise make it a habit to take your denture out at night.
Remember to store your denture in a glass of warm water when you take it out for the night. Never use hot water to soak your denture.