I think it is best to not listen to music during the rest period. Music wakes up part of your brain and doesn't let it rest. Even music that would normally put you to sleep, is followed by part of your brain. So just as it is not good to be fully awake without resting, I would guess you are cheating the rest period with music.
The reason you like certain music is built into your everyday personality, so I would guess that you engage that part of your mind with music. Even music you have never heard, or you don't like, would be followed by your brain, trying to make sense of it.