Sherwood Schwartz, the television genius who created "The Brady Bunch" and "Gilligan's Island" -- and wrote the theme songs for BOTH shows -- has died ... TMZ has learned.
Schwartz is a TV legend -- back in 1961, he won an Emmy for his work as a writer on "The Red Skelton Show."
Schwartz also served as a script supervisor on "My Favorite Martian" ... and a writer and producer of "Harper Valley PTA."
Sherwood worked in radio before transitioning over to television -- serving as a writer for Bob Hope's radio show. He also worked on the radio version of "The Adventures of Ozzie and Harriet."
Schwartz died of natural causes in his sleep, surrounded by his family.