It all depends on local regulations...
EDDN/NUE for example operates around the clock for stage 3 airplanes.
However, you cannot go there if the reason for your diversion is simply that you didn't make it to the destination before night curfew fell.
EDDT/TXL closes for scheduled flights at 2300 local, will accept landings until 2400 local if the scheduled time was before 2300. However, they will accept diversions from EDDB/SXF around the clock!