Any chance that you were giving any supplements like brewers yeast (B vitamins) in the late afternoon or evening? The B's can make it hard for them to sleep, as well maybe as some other supplements that might give them energy.
Some dogs seems to be sensitive to sulphur products - msm, garlic, eggs, etc., and it makes it seem like they are incontinent. My boy Max would leak urine on MSM or eggs, and I know another dog that would do it on garlic. Might be different supplements that are the culprit, but good to know that things are better off the supplements, so you can test each one one by one.