“Camelot” opened on Broadway 63 years ago, an eagerly anticipated new musical from the makers of “My Fair Lady.” But happily-ever-aftering took a while.Out-of-town, while trying to trim the overlong production, one writer was hospitalized with an ulcer, and the director collapsed of a heart attack. In New York, despite starring Julie Andrews and Richard Burton, “Camelot” took months to find its footing, and only did so following a televised segment on “The Ed Sullivan Show.”Today the musical, written by Alan Jay Lerner and Frederick Loewe, is remembered as one of the last of Broadway’s Golden Age shows, but its traditional narrative — Arthurian legend with all of its romance, politics, swordplay and sorcery — has never quite clicked.“Unfortunately, ‘Camelot’ is weighed down by the burden of its book,” the New York Times critic Howard Taubman wrote of the opening. That assessment has persisted. “It has one of the great scores of all time,” said Theodore S. Chapin, the former president of the Rodgers & Hammerstein Organization, “but the plot starts to go haywire.”On April 13, a new version of “Camelot” is scheduled to open on Broadway, with its book rewritten by Aaron Sorkin. The Hollywood screenwriter is familiar to many as the creator of the television series “The West Wing,” and he won an Oscar for writing the movie “The Social Network.” He is also an accomplished playwright, whose first Broadway drama, “A Few Good Men,” became a hit film, and whose most recent Broadway outing, an adaptation of “To Kill a Mockingbird,” was a critical and commercial success.Clockwise from top left: Aaron Sorkin, Phillipa Soo, Jordan Donica and Andrew Burnap.But musicals have not been part of his repertoire, until now. He earned a B.F.A. in musical theater from Syracuse University, but this, in his slightly overstated words, is “the first time I’m putting it to use.” (He tried writing a musical once before, partnering with Stephen Schwartz on a show about Houdini. It didn’t work out.)This rewritten “Camelot,” starring Phillipa Soo of “Hamilton” fame as Guenevere, alongside Andrew Burnap (“The Inheritance”) as Arthur and Jordan Donica (“My Fair Lady”) as Lancelot, is now in previews at Lincoln Center Theater. By contemporary standards, it’s a large production, with a 27-person cast and a 30-piece orchestra.Sorkin is not the first to revise the musical — even Lerner and Loewe reworked it post-opening, and others have tried, too — but his deft hand with witty, fast-paced dialogue and audience nostalgia for “Camelot,” which is adapted from T.H. White’s fantasy novel, “The Once and Future King,” has made the production one of the most anticipated on Broadway this year, with theater mavens eager to see how Sorkin puts his stamp on it.“People think the show is about a love triangle, which of course it is,” said Alan Paul, the artistic director of Barrington Stage Company and director of his own production of “Camelot” a few years back, “but I really think it’s about the birth of democracy, and when you look back at ‘The West Wing,’ which is one of my favorite shows, that is a TV show that believes government can work for the people.”‘You’re supposed to be dead.’Just getting to this point is an unexpected relief for Sorkin.In November, two months before rehearsals were set to begin, he woke in the middle of the night and noticed that, while walking to the kitchen, he was crashing into walls and corners. He thought nothing of it until the next morning, when the orange juice he was carrying to his home office kept spilling.Sorkin called his doctor, who told him to come in immediately; his blood pressure was so high, Sorkin said, “You’re supposed to be dead.” The diagnosis: Sorkin, 61, had had a stroke.For about a month afterward, he was slurring words. He had trouble typing; he was discouraged from flying for a few weeks; and until recently, he couldn’t sign his name (he has just discovered, thanks to “Camelot” autograph seekers, that that’s improving). Those issues are now behind him, and the main lingering effect is that he still can’t really taste food.“Mostly it was a loud wake-up call,” he said during one of several interviews for this article. “I thought I was one of those people who could eat whatever he wanted, smoke as much as he wanted, and it’s not going to affect me. Boy, was I wrong.”Sorkin had been a heavy smoker since high school — two packs a day of Merits — and the habit had long been inextricable from his writing process. “It was just part of it, the way a pen was part of it,” he said. “I don’t want to talk about it too much, because I’ll start to salivate.”After the stroke, he quit cold turkey, cleaned up his diet and started working out twice a day. And, he said, “I take a lot of medicine. You can hear the pills rattling around in me.”“If you write the book to a musical with a score written by Lerner and Loewe, and they have this cast, and Bart Sher is directing it, and it doesn’t work, it was definitely your fault,” Sorkin said.Jingyu Lin for The New York TimesSorkin told me about the stroke almost in passing, when we were having a get-acquainted cup of tea in a hotel lobby (he loves writing in hotels) earlier this year. Trying to understand his creative process, I asked whether he prefers to write longhand or on a device. That’s when he said writing by hand had become difficult.At first he told me about his stroke only off the record; we agreed we’d revisit the subject the next time we met, so he could think through the implications of going public. By then, he had decided he was ready to describe what he had been through, in the hopes that his experience might be a cautionary tale. “If it’ll get one person to stop smoking,” he said, “then it’ll be helpful.”He is aware how lucky he is to have recovered, and to be able to continue to do the work he loves. “There was a minute when I was concerned that I was never going to be able to write again,” he said, “and I was concerned in the short-term that I wasn’t going to be able to continue writing ‘Camelot.’”Now he’s commuting between Los Angeles, where he lives, and New York, where he’s trimming the script, offering pointers to actors, refining word choices that don’t strike him quite right. “Let me make this very, very clear,” he said. “I’m fine. I wouldn’t want anyone to think I can’t work. I’m fine.”‘Now with no magic!’For many people, “Camelot” is more familiar as a metaphor than as a musical — it depicts a noble effort to create a just society, often associated with the Kennedy administration, because Jacqueline Kennedy, in an interview shortly after President John F. Kennedy’s assassination, mentioned her husband’s fondness for the show, and quoted a final lyric: “Don’t let it be forgot, that once there was a spot, for one brief shining moment, that was known as Camelot.”Four years ago, Lincoln Center Theater, which is a nonprofit, staged a fund-raising concert performance of the show, starring Lin-Manuel Miranda as Arthur. It went so well that the creative team began talking about a full-scale production.“The music is so good, and it’s incredibly fun, and I don’t know of any other pieces set in the Middle Ages with knights,” said Bartlett Sher, a veteran of Golden Age revivals (“South Pacific,” “The King and I,” “My Fair Lady”) who directed the concert and is now directing this revival. “I realized how extraordinary the score was,” he said, “and how complicated the experience of the book was.”Julie Andrews and Richard Burton, center, starred in the 1960 production of “Camelot.”Pictorial Press Ltd / Alamy Stock PhotoSher was debriefing with Miranda when Sorkin’s name came up. “I knew Sorkin was a fan of ‘Camelot,’ because he quotes it in ‘The West Wing’,” said Miranda, who grew up hearing songs from the musical, a favorite of his mother’s, and memorized them while a passenger in her car.Sher and Sorkin already knew each other because they had collaborated on “Mockingbird,” and they were eager to work together again.“You would think we would have sat and talked for hours about the problems we had with the existing book, or what we were hoping for, but we didn’t,” Sorkin said. “I just got to work.”He made one key early decision that has guided his approach to the show: no supernatural elements. That means Merlyn, who in the original is a magician who can remember the future and can turn Arthur into a hawk, is now a wise tutor; Morgan Le Fey, who in the original can build invisible walls, is now a scientist; and the nymph Nimue is gone. Even Arthur’s sword-in-the-stone origin story is questioned.“It wasn’t that I don’t like magic — I do,” Sorkin said. “Nor were there commercial reasons — no producer wants to put on a marquee, ‘Now With No Magic!’ It was because I feel that this story, in particular, had a chance of landing more powerfully, more emotionally, if people felt real. If a problem can be solved by waving a magic wand, it doesn’t feel like much of a problem.”‘Musicals can get tangled with.’“Camelot,” like many older musicals, has its complications for a modern audience. “From a contemporary perspective, it’s very problematic,” said Stacy Wolf, director of the music theater program at Princeton University. “The musical is about heterosexual adultery ruining a visionary government, and the woman is ultimately blamed for it.”Nonetheless, Wolf is eager to see the revival. “The music that Lerner and Loewe wrote is just incredible,” she said, “and in the same way that Shakespeare gets tangled with, and operas get tangled with, musicals can get tangled with.”Sorkin quickly realized that two songs, in particular, posed problems: the sexist-sounding “How to Handle a Woman” and the classist-sounding “What Do the Simple Folk Do?”“When I first started writing it, I thought, there’s an easy way to solve this: Don’t sing the songs,” Sorkin said.But Sher asked Sorkin to reconsider, given fan fondness for the score. “There’s a reason we see ‘Camelot’,” Sorkin acknowledged, “and the reason isn’t me.”So he came up with an alternative solution: humor. The songs are back, preceded by dialogue in which Guenevere preemptively defuses their sting with Sorkin-esque wit.“When I joined, ‘How to a Handle a Woman’ wasn’t there in the script, but then one day it was,” Soo said. “But there was also a beautifully written scene — and this is another reason why Aaron Sorkin is brilliant at what he does — that explores the song in a new way.”The revival has been extensively nurtured — there were four developmental workshops along the way, and Sorkin estimates that he has written about 10 drafts of the script. Lancelot “went from being a buffoon, like Gaston in ‘Beauty and the Beast,’ to a three-dimensional person.” Arthur struggles to define his feelings for Guenevere, whom he marries as part of a peace treaty. And Guenevere is now a strategic helpmate, periodically outthinking her husband.“The ideas of democracy that are discussed in this show are the ones that are discussed in this country,” said Donica, left foreground, who plays Lancelot.Sara Krulwich/The New York Times“There have been rewrites at each stage of workshop, and there are even more rewrites still going on,” said the actor Dakin Matthews, who is playing Merlyn and another character.A case study: Morgan Le Fey, who in the original is a sorceress with a sweet tooth, and a threat to Arthur’s reign. At first, Sorkin simply cut the character — as Lerner had done for some post-Broadway productions — but, Sorkin said, “she found her way in, and she got better.”In an early workshop, the actress Daphne Rubin-Vega (the original Mimi in “Rent”), read the role, when Le Fey was little more than a spurned ex-girlfriend. “She, in a very nice but direct way, said I could do better,” Sorkin said. “She was right.”He made Le Fey a scientist, an unmarried mother, and, for a time, an opium addict. (Sorkin has been clean for 23 years after battling his own addictions.) Now she makes and sells brandy. “People coming in and auditioning — they were just leaning into being high on opium, and it wasn’t working,” Sorkin said.Marilee Talkington, who plays Le Fey, has embraced the character’s evolution.“The old version of ‘Camelot’ felt distant, but also fun and entertaining,” she said. “This version is inviting the audience to ask themselves who they are, what they want, and where there’s hope.”How much “West Wing” is there in “Camelot”? Sorkin said the screenwriting device for which he is most famous — the so-called walk and talk, in which characters converse while in motion, is a.) “probably exaggerated” and b.) a screen technique that “has no implications for the stage.” Having said that: Arthur has his best ideas while pacing.One trick Sorkin did transfer from filmdom: He intercut three scenes together, as in a movie, held together with scoring, and challenged Sher to figure out the staging. “Give Bart something like that,” Sorkin said, “and he’s a happy guy.”And there are lines that can clearly be heard as allusions to our contemporary challenges.“All of his films are about game-changers, and ‘Camelot’ is no different, because Arthur is a game-changer,” said Donica, the actor playing Lancelot. “And the ideas of democracy that are discussed in this show are the ones that are discussed in this country.”‘I worry that if I stop worrying then I won’t do it.’I sat down with Sorkin the morning after the first preview performance, and he was obviously pleased. It struck me that this was the first time he had seemed happy with his work. “That’s not an illusion,” he said. “It’s the most positive I’ve been during the process. I feel ashamed I didn’t have more confidence in everybody.”There was still work to be done over the five-week preview period — the show was running too long (“I’m sure I’ll be called upon to make some cuts, and I’m not looking forward to that”), and Sorkin was still wrestling with various bits of language (Would it be exciting or distracting if he changed an “or” to a “like,” with the effect of implying that Guenevere might be agnostic?).But until that first performance before an audience, Sorkin had repeatedly fretted about what might go wrong, remembering that at one point he told a group of young librettists, “If you write the book to a musical with a score written by Lerner and Loewe, and they have this cast, and Bart Sher is directing it, and it doesn’t work, it was definitely your fault.”I found it hard to understand how someone as successful as Aaron Sorkin could be so worried, so I asked him about it.“I have had some success, and I’ve also had plenty of experience feeling anxiety about what I’m doing,” he said. “Am I going to have an idea? Am I going to be able to write this?”One startling example: “I wrote 86 episodes of ‘The West Wing,’ and every single time I finished one, I’d be happy for five minutes before it just meant that I haven’t started the next one yet, and I never thought I would be able to write the next one. Ever.”Is that kind of worrying a liability, or a strength, for an artist like Sorkin? “I hope it wasn’t a waste,” he said. “And I do think to myself, as I try to relax myself a little bit, I worry that if I stop worrying then I won’t do it. That it’s the worrying that’s driving me to do it.”Sorkin, who has already begun having meetings about possible next musicals, even while dreaming up a Jan. 6 movie he is contemplating writing and directing, said he has come to see “Camelot” as a narrative about narrative.“Ultimately, the show is a valentine to storytelling,” he said.“I like that Arthur thinks if we can just keep telling these stories, then people will be inspired and they’ll believe that we do have greatness in our grasp, and that you have to keep trying,” he added. “The greatest delivery system for an idea ever invented is a story.” More