Black Eyed Peas' hit track I Gotta Feeling was written by will.i.am in his sleep.
The rapper admits he often feels inspired by his dreams, and jots down his ideas for tunes as soon as he wakes up.
He tells BBC's Newsbeat, "I've written songs right from a sleep. Have you ever had a dream where there's a melody in your dream? I'll wake up out of my sleep and record that!
"I Gotta Feeling was one of those songs. From a random mumble, listening to conversations in the back and making sense of melodies."
The Black Eyed Peas star is not the only musician to draw inspiration from his dreams - Sir Paul McCartney famously came up with the melody for classic Beatles track Yesterday while sleeping.