Macbook - Freezing after Idle

Hey guys, my macbook sometimes freezes up after being left idle for a little while. I cant get the trackpad to respond and none of the keys snap it out of this "frozen" state. Any idea of how to fix this, the only way to fix it has been to force shut down.