macOS: MacBook goes hibernate during night and does not restore all windows after turning on Using MacBook Pro 13 2015 with macOS Sierra.

Just closing my Mac lid.  Went to sleep.

Mac is connected to external monitor with miniDisplayPort, though monitor power turned off during the night.

Mac is running on AC power.

Next morning trying to login to my Mac, I'm seeing spinning circle on my monitor (not opened mac lid till now).

Waiting some time, some seconds pass, spinning wheel just goes on.

Tired of waiting, opening mac lid and pressing power button.

Mac starts in login screen, suggesting me to use my credentials to login.

It starts off with just one app I left before.

Is this normal behavior at all?

Also, I see that uptime is going on:

Mac:Google sevenfourk$ uptime
11:42  up 1 day, 16:41, 3 users, load averages: 1.97 1.76 2.08
Mac:Google sevenfourk$ 


I mean, it actually hibernated.

Note: Currently having Bootcamp partition in place.
Ok, I see here: https://support.apple.com/en-us/HT201635


  OS X Mountain Lion v10.8.2 supplemental update 2.0 introduced a feature that lets your Mac enter safe sleep after four hours of being connected to AC power. This complies with European Energy Standards (ErP Lot6) and happens when there's no network activity and no activity from connected devices like external hard drives. 


that my Mac could have hibernated after four hours of inactivity. But would not that restore all of my work.