I'd suggest doing the following...
1. Sort your music into two main playlists of questionable and non-questionable content. This is probably going to be the most manual part of the process no matter what route you take unless you employ some kind of cddb obscenity check.
2. Take a look at some of the iTunes related AppleScripts out there. Create a couple simple scripts to launch each of the two playlists. One script launches one list, and the other launches the other list.
3. Read up on OS X's built-in cron functionality to schedule tasks. Schedule the script that launches the questionable material (and stops the safe material) to play at midnight. Schedule the script that plays the safe material (and stops the questionable material) to play at 6am.