Macbook acts as if rebooted after unlocking it
This happens on a regular basis, and is on a Macbook Pro 13" (2012), running OS X 10.9.5.
When I lock it, and leave it in a locked state for a while, then come back and unlock it, it's as if the whole machine is rebooted. I notice my extensions are reloading, the applications that I had open when locking it are restarted (losing work/settings that was there when the machine was locked) - and it actually seems the machine has been restarted (it hasn't).
Are there any settings I am missing? Is it a bug? Could it be a firmware thing?
The machine is not on battery, but on power, but it almost seems like it enters a sort of deep sleep a while after being locked.
Any ideas?