This is a play on words. The phrase "rocked to sleep" means to help someone fall asleep by moving them back and forth in a gentle rhythmic motion. However, here "rocked to sleep" refers to the subject of the joke playing rock and roll music until he falls asleep.
The guitarist passed out on stage , he must have rocked himself to sleep .