You accidentally selected shutdown...
You lost power overnight and it shut itself off...
It's a government conspiracy and they accessed your iMac remotely and turned it off to make you paranoid...
Way too many variables at this point. I'd only worry about if it happens repeatedly.