That’s a head-scratcher, but I’ve run into something similar before. Besides the timer or relay being stuck, another thing to look at is whether you’ve got an automatic freeze protection or “prime” feature built into your system. Some pumps or control boxes kick on in the middle of the night if they sense really low temps, or if they think the pump needs to keep water moving to protect it.
Even if you think the timer is off, the override circuit can still engage. If you want to test it, try disconnecting the pump from the timer and plugging it into a dedicated outlet for a couple nights. If it stays quiet, then the timer box is the culprit. If it still kicks on, you’re probably dealing with some internal safety feature or a wiring quirk. Either way, I’d keep a close eye on it, electrical gremlins around water equipment are better to sort sooner than later.