“Everything’s couched with hard jokes, but it’s also vulnerable,” the comic said of “The Bedwetter,” her new musical comedy.When the comedian Sarah Silverman was maybe 8, her father gave her a joke book. This was no childhood compendium of riddles and rhymes. It was a collection of “tasteless” humor, and on the very first page, she recalled, it contained a zinger about Little Red Riding Hood getting it on with the Big Bad Wolf.As a child, Silverman was mystified by these punch lines. As an adult, she said, “I went, oh my God, what is wrong with my father?” And then she wrote the whole bit into “The Bedwetter,” the new Off Broadway musical based on her memoir of the same name. It’s one of many R-rated episodes that were inspired by her beloved dad, who taught her to swear when she was 3, unwittingly setting her on the path to becoming a comic.The family life she has memorialized onstage was short on boundaries and weighted with despair. “The Bedwetter,” which begins previews April 30 at the Linda Gross Theater, centers on a 10-year-old Silverman, who suffered from the embarrassing condition of the title. It deals frankly with divorce and depression — but it’s a raucous comedy.“Everything’s couched with hard jokes, but it’s also vulnerable, and sad,” she said. “I really hope people bring their kids.”Silverman and cast members in their Times Square rehearsal studio, preparing the show (again) after a two-year pandemic delay.Mark Sommerfeld for The New York TimesAn Atlantic Theater Company production originally scheduled for the spring of 2020, the show lost one of its original creators, the musician and Emmy-winning TV and stage composer Adam Schlesinger, who died from complications of the coronavirus on April 1, 2020. His death and the two-year pandemic delay deepened the meaning of the production, its creators said, even as it sharpened the jokes. Seeing the show through became a mission for some of his collaborators.And it arrives as Silverman, 51, has reached an unexpectedly beneficent phase of her career, and a new level of maturity in her personal life. As the cultural lines around “appropriate” humor are repeatedly redrawn, she is one of the few performers who has, seemingly genuinely, all but renounced the early work that put her on the map.For decades a convulsive and taboo-busting top comic, she has transformed into a still bitingly funny and progressive feminist voice who advocates for earnest connection (even with Republicans). With a huge, cross-generational network of comedy friends and a pandemic-era podcast that doles out gentle advice, she’s become an unlikely moral center of the comedy community: a Gen X Mr. Rogers, with a topknot ponytail and a profane streak.“Sarah’s secret weapon is her big heart,” said the filmmaker Adam McKay, a friend and a producer of her 2017 Hulu series “I Love You, America.” Erin Simkin/Hulu“She’s able to take audiences into shadowy, tricky places because we all trust her and know she’s a force for good,” said the filmmaker Adam McKay, a friend and a producer of “I Love You, America,” the 2017 Hulu series that showcased her efforts at bridge-building humor. “Sarah’s secret weapon is her big heart.”The confluence of darkness, dark humor and love is the key to “The Bedwetter,” which began when Schlesinger, the witty Fountains of Wayne power pop bassist, read Silverman’s 2010 best-selling memoir, and decided that chapter headings like “My Nana Was Great but Now She’s Dead” and “Hymen, Goodbyemen,” were the seeds of great comic songs. Silverman and Schlesinger began working on the project a decade ago, becoming friends in the process. “We started going to this piano bar karaoke every other Friday,” she said, noting that she still can’t strike the standing get-together from her calendar.Some of the reference materials for the show in the rehearsal space.Mark Sommerfeld for The New York TimesPhotographs of Silverman and her family from the ’70s and ’80s.Mark Sommerfeld for The New York TimesShe was speaking over lunch recently at a bustling restaurant near Union Square. She’d arrived on foot and alone, looking not AARP age but like the early ’90s N.Y.U. student she once was, in jeans, a Santana ringer tee and a backpack. (“I always say, you should live well below your means — you don’t need a purse, get a backpack.”) Her conversation was generously detailed and inquisitive; she acted out her stories, but not enough to draw much attention in the room. Almost no personal detail was too embarrassing to share, anyway. “I learned disassociation at a very young age, as a bedwetter who had to go to sleepover camp,” she said.Having known that abject social terror — she wet the bed well into her teens — Silverman leans into compassion. She even had empathy for a guy at Comic-Con who, years back, suddenly punched her in the face while wearing a Hulk fist. “I could tell he just didn’t know what to do with all his feelings.”But she also knows how to cackle her way out of the depths. She mentioned a friend’s death. “Suicide, I think, is sometimes so — ” Silverman began, when she clocked the waitress dropping by our table.“So whimsical!” she concluded, in purposeful earshot. “I don’t know, it’s the one thing you really should put off till tomorrow, every time.”When the pandemic cut off her stand-up tours, she started a weekly podcast, and professed surprise about the number of callers in real need, with problems both personal (depression) and cultural. “Are we Jewish?” asked one woman, befuddled by her family history. “Being Jewish is a state of mind!” Silverman replied. (One of her three sisters is a rabbi, but Silverman herself is not religious.)Silverman in the Times Square rehearsal space. “Sincerely confronting one’s darkness in the same space as making light of it was a formative example for me,” the actress Ilana Glazer said of Silverman’s work.Mark Sommerfeld for The New York Times“I thought it would be silly and dumb, and then I’d talk politics,” she said of the podcast. “Then I get people so earnest, and — I’m my mother — I think I can help. But so much of the time I’m talking out of my ass; just the classic someone-who-does-a-lot-of-therapy thinking they’re a therapist.”Still, she added, there “are just things I’ve learned, because I’ve lived a long time, and I’m curious.”HER INFLUENCE IS WIDELY FELT. “I look up to Sarah,” the actress and writer Ilana Glazer (“Broad City”) wrote in an email. “She can hold the nuances of the big picture, socially, historically, personally — and process those complexities spontaneously” in her work. Silverman is not the only comic to reveal her struggles, but she may be the most honest. “The idea of sincerely confronting one’s darkness in the same space as making light of it,” Glazer wrote, “was a formative example for me.”Silverman has dipped into dramatic roles (she played a lesbian who died in childbirth on the Showtime series “Masters of Sex”) but mostly has a side career as the funny, smart friend in movies; she’ll next host “Stupid Pet Tricks,” a takeoff on the old Letterman bit, as a variety series for TBS. And after a decade of condo-tower living in Los Angeles, she just bought her first home, to the relief of friends like Chelsea Handler.“I ran over to take a look at it, concerned she bought a one-bedroom bungalow tucked underneath the Griffith Observatory,” Handler, the comedian and author, wrote in an email. “When I saw she had bought herself a big-girl house, I thought, well, there we go, she’s accepted adulthood.” Silverman’s boyfriend of nearly two years, Rory Albanese, the showrunner for Jon Stewart’s “The Daily Show,” has moved in; the first time she’s cohabitated with a partner in over a decade, and the very first time on her own turf.For a musical about a bedwetter, you need a bed. It’s a central piece of the set for the show, which begins previews April 30 at the Linda Gross Theater.Mark Sommerfeld for The New York TimesSilverman, who said she has been on Zoloft since 1994, is open about her mental health. She was clinically depressed as a kid and, back when doctor’s orders were rarely questioned, was prescribed a dosage of Xanax that would hobble a SoundCloud rapper. Also, her first psychiatrist hanged himself. It’s all in the musical, along with her mother’s debilitating depression which, in the show, leaves her largely bed-bound. (But remember, it’s a comedy!)The Covid shutdown and Schlesinger’s death came as the musical’s creators were in New York, ready to start rehearsals for their imminent run. Instead they began gathering on Zoom to check in. Eventually, they brought in as a creative consultant the musician and composer David Yazbek, a Tony winner for best original score for “The Band’s Visit” and a nominee for “Tootsie.”At that point, there was a surreal and palpable sense that someone was missing, Yazbek said. “Being able to laugh was not just sort of healing and important, but actually kind of vital — for us, I’m not even talking about any audiences.”That sentiment did go in the show, buoyed by Silverman’s own experience with loss. Her mother, Beth Ann, who recovered from depression and went on to become a successful theater director in New Hampshire, died in 2015; as did the 30-year-old writer Harris Wittels, who worked on “The Sarah Silverman Program,” her Comedy Central series; and Garry Shandling, the comedian and a mentor, in 2016.That year, Silverman suffered a near miss of her own, when she had a rare case of epiglottitis, a swollen abscess around her windpipe, and was rushed into emergency surgery. After her discharge, in withdrawal from pain meds, “I was chemically suicidal,” she said; she had not been given her anti-depressants during the hospital stay.“It will be familiar to so many people,” Silverman said about how the musical explores the emotions raised by divorce.Mark Sommerfeld for The New York TimesGoing through these traumas and emerging laughing, “I don’t think a lot of people do that with such finesse,” said Anne Kauffman, the director of “The Bedwetter.”IN THEIR TIMES SQUARE rehearsal studio, there were inspo pictures of the Silverman family circa the ’70s and ’80s; Sarah inherited her eyebrows from her dad, Donald, who owned a discount clothing store. The cast, which includes Darren Goldstein and Caissie Levy as the Silvermans and Bebe Neuwirth as Nana, cycled through a kaleidoscope of anger, anxiety and silliness. It was very funny. Ganged up on by some fifth-grade mean girls, who taunt her with “You’re short and dark and strange and ooey,” Zoe Glick, who plays Silverman, is enthusiastically self-deprecating: “I couldn’t agree more!” she sings cheerfully. “I’m the type of kid that’s too Jewy to ignore.”The music is as sticky as the best pop song — Schlesinger’s touch. Both Yazbek and Henry Aronson, the musical director, said they tried to channel him as they finished the project. He worked in a Beatles pop tradition, Aronson said, “a certain deceptive simplicity, harmonically.”Silverman, taking notes at a table, popped up to sub for an absent actor, sweetly singing a jingle for “Crazy Donny’s Warehouse (for Your Messy Divorce).” If it was initially bizarre to watch her family’s emotional upheaval recreated — her parents split when she was around 7 — “I’m also so thrilled, because I feel like it will be familiar to so many people,” she said.Kauffman, the director, said Silverman has illuminated her history — “What was your mom like in this moment? Would your dad have cracked a joke?” — with what works dramaturgically. “She just has this incredible memory and ability to articulate exactly what she was experiencing, which is like a director’s dream. Her as a 10 year old is very viscerally present.”And she punches up the jokes. When Glick was doing a scene that involved making fart noises, Silverman advised her: “Point to your mouth, to really focus” on the body part it’s standing in for, she told her, in less PG language. “It will be funny.”Silverman has moved on from the incendiary language she used at the beginning of her career. “It’s so funny what a burden some people feel it is, to have to change,” she said.Mark Sommerfeld for The New York TimesA word — OK, a paragraph — about farts (and also a sentence I never expected to write in The New York Times). If you thought Silverman might’ve outgrown her affinity for juvenile, scatological humor after a half-century, you’d be wrong. “She has an inability not to laugh if you fart,” Yazbek said. During rehearsal, I caught her giving Joshua Harmon (“Bad Jews,” “Prayer for the French Republic”), who wrote the book with her, a demo in fart noise technique, her hands cupped around her mouth.She has never not wanted to be a performer, said her sister Laura Silverman, who recalled that when she had friends over as a kid, Sarah would pop out of a closet, doing costumed characters, to entertain them.And her family was supportive in creative ways. “I would pick up the phone and call the operator and have her sing ‘Tomorrow,’ from ‘Annie,’” said Laura, an actor and writer. “I would say, I didn’t want her to be scared to sing or perform in front of anyone, at any time.” When Silverman, as a very young child, unleashed the string of curse words that her father taught her — a cherub with inky curtain bangs, working blue — “I would get this wild approval from adults, despite themselves,” she said. “It felt so good, made my arms itch with glee, and I became addicted to that.”Only when she wrote her memoir did she connect the dots between that feeling and her comedy: “So much of my standup, especially early on, was shock, shock, shock,” she said, “and totally trash.” She used racist epithets, misguidedly, to prove a point, which she now says she regrets — she’s gladly left that language behind. “It’s so funny what a burden some people feel it is, to have to change,” she said.The only word that Silverman whispered, in our three hour lunch, was “menopause.”When pressed — no, pleaded with — she said she would write about that topic, though she’s still working out the terms. (“There is not a female word for emasculating, but that’s what menopause is.”) But talking about her body and her needs, is “how I learned to be vulnerable and honest,” she said. “It’s an incredible revelation some people don’t even realize they can do. The truth! It’s really wild.” More