What modem do you have? That's about the time my X1 system reboots each device for updates. The modem does periodically receive updates. Have you contacted Xfinity?
FWIW, the overnight hours are their prime window of opportunity for performing maintenance / upgrades on their network. How long has this been going on ? It shouldn't be every night for extended periods of time.