"Sexy Sadie" is the name of a song by The Beatles, written by John Lennon in India and credited to Lennon–McCartney.
Lennon originally wanted to title the song "Maharishi", but changed the title to "Sexy Sadie" at George Harrison's request. Lennon was disillusioned after Maharishi Mahesh Yogi had allegedly made a sexual advance at one of the female members attending the course the Maharishi was teaching at his ashram. (Harrison, Paul McCartney, and Cynthia Lennon later said that they thought the story, which had come from Alexis Mardas, had been fabricated.) Lennon once said of the song: "That was inspired by Maharishi. I wrote it when we had our bags packed and were leaving. It was the last piece I wrote before I left India. I just called him, 'Sexy Sadie,' instead of (sings) 'Maharishi what have you done, you made a fool...' I was just using the situation to write a song, rather calculatingly but also to express what I felt. I was leaving the Maharishi with a bad taste. You know, it seems that my partings are always not as nice as I'd like them to be." He told Rolling Stone that when the Maharishi asked why he was leaving, he replied, "Well, if you're so cosmic, you'll know why." 
After returning from India, Lennon scratched the lyrics into a piece of wood, with the original title "Maharishi". The recorded version changed only after Harrison insisted that if the song was used he wanted the name changed and persuaded Lennon to change the title to "Sexy Sadie". Harrison recounts the event in the director's cut of the anthology film. Derek Taylor remembered Lennon fiddling about scratching the wood in the Apple offices. The wood ended up in the possession of Maureen Starkey and was ultimately sold to a Beatles' collector.
According to Mark Lewisohn's The Complete Beatles Recording Sessions, an early outtake of "Sexy Sadie" features Lennon demonstrating the song's original working lyrics to the rest of the band: "Maharishi, you little twat/Who the fuck do you think you are?/Who the fuck do you think you are?/Oh, you cunt."
The song's instrumental fade-out was originally longer and featured a breakdown based around the middle 8. This was edited out prior to mixing.
In a 1969 interview, Lennon stated one of his favourite songs was "I've Been Good To You" by Smokey Robinson & The Miracles. The Miracles song begins with the line Look what you've done / You made a fool out of someone, compared to Sexy Sadie's What have you done? / You made a fool of everyone.
As described in Vincent Bugliosi's Helter Skelter, Charles Manson took the title of this song as a reference to Manson Family member Susan Atkins, who was nicknamed Sadie Mae Glutz, prior to the release of the White Album. The song inspired one of the characters' names in the 2007 Beatles-themed film Across the Universe, Sadie, played by Dana Fuchs. The band Sexy Sadie took their name from this song. Jet's song "Look What You've Done" contains the line, "Look what you've done/You've made a fool of everyone." The main piano riff in the Radiohead song "Karma Police" is inspired by the piano in this song.