Here are two Bash scripts I wrote some years ago that allow you to send your computer to sleep for a specified time and then wake up automatically. They work with the rtcwake and pm-suspend tools.