Putting a "Sleep Timer" on a PC?

I one of those people who likes to fall asleep while listening to the radio or TV. And I recently got the idea of doing something similar with a computer. I'd like to be able to play a podcast, or youtube video, or DVD on my laptop and have it shut down, or at least go to sleep, after a certain amount of time. Only thing is I don't know how. Is there a way to do this?