When you put your macbook to sleep, the first thing it does is copy the contents of the memory to the harddrive, then go to sleep. This is so that if power is completely lost (say it's running just on the battery, and the battery is unplugged, or runs out of juice) your computer can still restart without a problem when power is restored. It's a deep sleep.
The problem is that if you try to wake it back up while this is happening, it won't wake up--at least until it's done, possibly not until it's done and you tell it to wake up. I find the best thing to do in these cases, is to wait 15-20 seconds and press the return key. If nothing happens, wait another 15-20 and press it again.
There is a way to turn off the deep sleep feature, that would mean the macbook went right to sleep and should be able to wake right back up again, but if it ever lost power while it was asleep, any unsaved work would be lost.
DG