It is not recommended to leave the crossbow cocked for more than 24 hours at a time. Cocking a crossbow for a day is fine. If you cocked a crossbow in the morning and leave it cocked throughout the day.
Then you can safely discharge the crossbow in the night.