Mark O’Donnell, who won a Tony Award in 2003 as co-author of the book for the Broadway musical “Hairspray” and was nominated for another in 2008 for “Cry-Baby,” died on Monday in Manhattan. He was 58.

He collapsed and died suddenly, and the cause of death has not yet been determined, his agent, Jack Tantleff, said.

“Hairspray” was an adaptation of the 1988 film by the iconoclastic John Waters. It tells the story of a plus-size teenage girl in the 1960s whose dream is to get onto an all-white television dance show in Baltimore, and then integrate it. Her mother is always played by a man in drag (Divine in the movie, Harvey Fierstein in the original Broadway cast, John Travolta in the 2007 movie version of the musical). Mr. O’Donnell wrote the text of the play with Thomas Meehan.

Mr. O’Donnell had published cartoons and poetry and written Off Broadway plays when he was asked to work on “Hairspray.”