I use this script when putting the house to sleep at night, if music is playing it will gradually fade out over time, then stop iTunes and reset the volume to your regular level.
Stole most of it from Doug's AppleScripts: http://dougscripts.com/itunes/
-------
property tick : 1 -- change volume level by this many each loop
property thismany : 30 -- seconds to wait before making next change to volume
tell application "iTunes"
repeat
set snd to sound volume
if snd is less than or equal to tick then
set sound volume to 0
exit repeat
end if
set sound volume to (snd - tick)
delay thismany
end repeat
stop
end tell
tell application "iTunes"
stop
set snd to sound volume
set sound volume to 40
end tell