Personally I'd do this using AutoHotKey to pause my player. Just add a script like this:
^Pause:: ;Activates with Ctrl+Pause, you may want to change this
Sleep, [time in ms] ; Replace [time in ms] with however long you want it to wait before stopping your music
Send Pause ; my music player pauses when i hit the "pause" key, so I'd use this, if yours doesn't, try Media_Stop or if you really want to mute, use Volume_Mute
EDIT: just saw this on lifehacker and couldn't help but think of this post, so I'm adding it
http://lifehacker.com/5522204/itunes-sleep-timer-stops-playback-after-a-user+defined-time