Have you considered moving the time you feed? It just could be that your dog's "transit" time is such that they need to go during the night. Moving food back or forward by a few hours might be enough to help.
Are you in an area with much firework noise? Could it be a fear reaction to late night loud bangs?