Hello tonymordaunt,
Welcome to PCHF. This would never be caused by a virus.
Check your BIOS settings (F1, F2 or [DEL]) when booting up.
Some BIOS allow you to auto boot at a set time, normally found in Power Management.
Also look out for external sources that may be causing your problem. Is there something that happens at midnight? You can also disable things in BIOS such as wake up on lan, and resume on power failure.
All BIOS are different, but here is an example:
