A server needs processing power, if your computer is asleep it doesn't process anything.
So in short, you can't.
You can however change some settings so you can close your laptop without it going to sleep, if you didn't already.
If you don't use that laptop for playing but only for hosting or you can find an other one. You can place it in a closet somewhere and access it using a program called "
Teamviewer"