iMac hangs when waking up with MAMP running
This may not answer your question directly, but it is a solution....

I am not a fan of doing dev work on my production Mac.  I also don't see any value in setting up a MAMP server because it will be a very rare occurrence that you get a hosting provider with MAMP setup.  Chances are it will be LAMP and by a very small margin, WAMP.

Why not set up a LAMP box with CentOS in a virtual machine.  VirtualBox would be a good choice for this.  The beauty with this is that when your Mac goes to sleep, it automatically puts the VM into a saved state - meaning when wakes, it is right where it left off.

The other huge benefit is that you can move that VM to other machines where as your MAMP setup, you are pretty much bound to your hardware.

Just a thought....