Some googling indicates that they're high enough that light refracting across the atmosphere will still hit them, and yeah, the moon, and also just some reflections from earth and airglow.
I've not done any real research here - it didn't seem odd to me that I could see them, so I haven't done any investigation at all here until these comments.
It wouldn't be possible for them to get direct sunlight that low during the middle of the night. Unless you are at very high latitudes in summer.