Sleep / hibernation logic on OS X
It depends on how you have configured the hibernate bits in the power manager.

Setting aside desktop machines which by default to not write anything to persistent storage when the system enters sleep, the default behavior is to write a copy of RAM to storage so that either power remains to wake the machine from RAM or the system will detect the sleep image and restore from that rather than booting from a clean state.

You can set more exotic combinations using pmset and a shell, but it is not officially "supported".