Danny Elfman put together the iconic score of Tim Burton's Batman in the bathroom of an airplane of all places, seriously concerning several flight attendants in the process. Perfectly capturing the essence of Batman, Burton's music for the movie was just as important as the performances of its lead stars, Michael Keaton and Jack Nicholson. It turns out that creating the amazing music was done on a whim when the tune came to Elfman at a most awkward time.

Recently, Danny Elfman appeared on the WTF with Marc Maron podcast. Addressing the music he's made during his career, the topic turned to how the Batman score was made. Per THR, here's what Elfman said about the origins of the iconic music..

RELATED: Batman Forever Fans Plan #ReleaseTheSchumacherCut Trending Event for Next Week
"That hit me at the worst possible time. On the way home, the thing f**king hits me. And it was like, what do I do? I'm on a 747. How do I do this? I am going to forget this all. I'm going to land and they're going to play some f**king Beatles song, and I'm going to forget everything... I start running in the bathroom [and hum phrases] and I go back to my seat, and I'm thinking, I'm thinking. Ten minutes later, back in the bathroom. And then back to my seat and then back to the bathroom, because I couldn't do this with the guy sitting next to me."

Elfman goes on to explain that his frequent trips to the bathroom aroused suspicion from the flight attendants. It got to the point where he was confronted by attendants who met him at the bathroom door when he came out, and they didn't seem to believe him when he said that he wasn't doing anything improper or illegal. Little did they know that it was the Dark Knight's theme that was slowly coming together in that airplane bathroom.

"Ten minutes later, I am back in the bathroom, And I open the door and this time there are three flight attendants. And they were probably going, 'What the f*ck he is doing so frequently? You can't do that much blow. You can't shoot up that often. What is he doing in there?!' And I piece by piece was working out the Batman score in my head."

Tim Burton's Batman has been in recent headlines for other reasons as well. In particular, the return of Michael Keaton as Bruce Wayne/Batman in The Flash has a lot of DC fans excited. Just recently, director Andy Muschietti shared an image of Keaton's Batsuit to further tease his return. It will be the first time Keaton has been in the role since previously returning for the sequel Batman Returns in 1992, which Elfman also scored.

Meanwhile, Elfman recently worked on the music for Doctor Strange in the Multiverse of Madness. Directed by Sam Raimi, that movie stars Benedict Cumberbatch reprising his role as the titular superhero with Elizabeth Olsen also returning as Wanda Maximoff. It's set to be released on March 25, 2022. The story of Elfman's Batman music creation comes to us from The Hollywood Reporter.