Mary Rodgers, a daughter of the celebrated composer Richard Rodgers who achieved her own artistic success with works including the musical “Once Upon a Mattress” and the novel “Freaky Friday,” died June 26 2014 at her home in New York City. She was 83. The cause was heart disease, said her son Alexander “Alec” Guettel. Another son, Adam Guettel, is the composer-lyricist of noted musicals including “The Light in the Piazza.” Ms. Rodgers was the elder daughter of Richard Rodgers, who in partnership with lyricists Lorenz Hart and Oscar Hammerstein II produced many of the most enduring musicals in the history of American theater. She grew up listening to her father coax tunes from the piano and observing the celebrity, if not always contentment, that came to him as a creator of musicals such as “Carousel,” “South Pacific,” “The King and I” and “The Sound of Music.” She, too, displayed artistic promise — although she said her talent was not as abundant as her father’s — and pursued music as a vocation. Ms. Rodgers was best known for composing the music for “Once Upon a Mattress,” which was inspired by Hans Christian Andersen’s fairy tale about a princess who proves her identity by daintily detecting a pea beneath a stack of mattresses. With lyrics by Marshall Barer, the musical opened in 1959 with the young comedienne Carol Burnett as Princess Winnifred. The show was nominated for the 1960 Tony award for best musical but lost to “The Sound of Music,” which shared the title with “Fiorello!” by composer Jerry Bock and lyricist Sheldon Harnick. Ms. Rodgers’s other musicals from the 1960s — including “Hot Spot,” a satire about a Peace Corps volunteer, and “The Mad Show,” a revue inspired by Mad Magazine — did not enjoy the same popularity. She later shifted her attention to writing books for young readers. The most famous of them was “Freaky Friday” (1972), the story of Annabel Andrews, a teenager who, after quarreling with her mother, wakes up to discover that they have switched bodies. High jinks and, eventually, a degree of understanding ensue. Ms. Rodgers wrote the screenplay for the 1976 film version of her book, starring Barbara Harris and Jodie Foster as mother and daughter. Shelley Long and Gaby Hoffmann appeared in a 1995 TV version. A 2003 movie remake featured Jamie Lee Curtis and Lindsay Lohan. Mary Rodgers was born Jan. 11, 1931, in New York City. Her mother, the former Dorothy Feiner, pursued occupations including writing and interior design. In adulthood, she and her sister, Linda, described their father’s personal struggles, which included alcoholism and depression. Ms. Rodgers majored in music at Wellesley College but left before graduating to marry. While raising her children, she worked as a composer, collaborating with artists including Leonard Bernstein. She credited her close friend Stephen Sondheim with promoting her both as a composer and as a writer. Her first marriage, to Julian “Jerry” Beaty Jr., ended in divorce. Her husband of 51 years, Henry Guettel, died in 2013. A son from her second marriage, Matthew Guettel, died at 3 from asthma. Survivors include three children from her first marriage, Richard Rodgers “Tod” Beaty of Cambridge, Mass., Nina Beaty of Southampton, N.Y., and Constance Peck “Kim” Beaty of New York City; two sons from her second marriage, Adam Guettel of New York City and Alec Guettel of Bedford, N.Y.; her sister; and seven grandchildren.