Writer/director Mike Birbiglia and radio personality Ira Glass. (Larry Busacca/GETTY IMAGES)

Comedian Mike Birbiglia has a knack for amusing analogies. For example, he likens his directorial debut, the movie “Sleepwalk With Me” — an adaptation of his popular stand-up gig-turned-solo show — to a behind-the-wheel nightmare.

“Directing your first feature is a little bit like showing up to middle school in seventh grade for the field trip and jumping on the bus and saying, ‘So, I’m going to drive the bus,’” he said over the phone from New York. “And everyone’s like, ‘What? But you don’t know how to drive the bus,’ and you’re like, ‘Yeah, I know. But I’ve been watching the bus driver, and I feel like I have the hang of it. And I’ve been watching other bus rides, and I have my favorite and I have my least favorite, and I feel like I’ve developed a bus driving aesthetic.’”

In either scenario, odds are good that less adventurous souls will skip the ride. But Birbiglia, 34, has a mysterious way of collecting passengers for his creative journeys. For starters, the comedian co-wrote the screenplay with Ira Glass, host of public radio’s “This American Life,” who, years later, still seems a bit confounded as to how he got roped into the project.

“I don’t have a smart answer for that. I only did it because Mike kind of waved his arms around and said this might be fun,” said Glass, also one of the film’s producers. “I don’t think I anticipated just how consuming it would be and how many years it would take.”

The screenplay, a slightly fictionalized retelling of Birbiglia’s young adulthood, follows an aspiring comedian at a crossroads. After graduating from Georgetown University in 2000, the Massachusetts native, who now lives in Brooklyn, had to decide whether to marry his admittedly wonderful live-in girlfriend (played in the film by Lauren Ambrose) or let her go.

Mike Birbiglia (Larry Busacca/GETTY IMAGES)

The twofold pressure of his fledgling career, which routinely had him on the road for long stretches, and potentially impending nuptials exacerbated the comic’s latent sleep disorders. He began acting out his dreams. At first the problems were manageable, as Birbiglia attacked a hamper in the middle of the night, convinced it was a jackal. But pretty soon he was jumping off bookcases, waking up half-naked in hotel hallways and putting himself in life-threatening danger — though that moment is better seen onscreen than divulged here.

This all happened long before Birbiglia became a frequent guest on “This American Life,” started selling out large venues (the Warner Theatre among them) and garnered a comedy album of the decade designation from the Onion A.V. Club. His act took time to catch on; it’s far from typical bawdy stand-up fare, and his persona is hardly the bullying heckler, using audience members for target practice. Instead, Birbiglia, who still does stand-up and performed at DC Improv on his last trip through town, comes across as almost childlike, between his somewhat slurred speech patterns, earnest delivery, wide eyes and eyebrows that seem perpetually in a state of surprise.

Birbiglia eventually earned a devoted following, as well as some unexpected fans. After attending one of the comedian’s performances, Nathan Lane offered to attach his name to the one-man version of “Sleepwalk With Me,” which had a critically acclaimed off-Broadway run. Lane’s proposal was all a matter of happenstance, what Birbiglia calls “sort of a flukey thing” that ended up being unlike any gift he’d ever received. Maybe it seemed so unexpected because Birbiglia is accustomed to putting things in motion himself. In fact, the underlying message in the film’s path to the big screen might be: Ask and you shall receive.

“Much like the character in the film, I have a delusional quality where I somehow feel like it’s okay to ask the titans of the fields I’m interested in for advice,” Birbiglia deadpanned. Among the long list of helpful sources was Oscar-winning screenwriter/director Alexander Payne (“Sideways,” “The Descendants”), “Girls” creator Lena Dunham, “Curb Your Enthusiasm” funnyman Jeff Garlin, screenwriter Mike White (“School of Rock”) and indie director Miguel Arteta (“Cedar Rapids”).

While that cast of characters provided some sweeping advice about acting, writing and directing, Birbiglia also sought counsel on more granular aspects. Given that the movie’s narrative is punctuated by moments where the comedian speaks directly to the audience, the budding screen actor decided to talk to someone with immense experience.

“Mike actually called Matthew Broderick,” Glass said, sounding slightly incredulous. “Nathan [Lane] performed with Matthew in ‘The Producers’ for years, so he could call up Nathan and say, ‘can you give me Matthew’s phone number?’ So he called up Matthew Broderick and he said, ‘We’re going to do this thing with direct address to camera, do you have any advice based on your experience in ‘Ferris Bueller’?” Newcomers might be too sheepish or too proud to ask for guidance, but Birbiglia’s approach helps flatten out the learning curve. As Glass notes, “When you’re doing something for the very first time, you’re not going to be good at it, and so the only way it’s going to be decent is if you tap into the expertise of others.”

If there’s another lesson in all of this, it might be that — even in the famously cutthroat movie business — the golden rule applies.

“He has good manners and isn’t pushy and seems really sweet, and somehow you want to help him,” Glass said. “I can’t describe it. It’s some crazy mind trick that he’s doing that is very much instrumental to where he’s gone and how he’s been able to put this together.”

The cinematic brain trust has paid off so far. The movie, which hardly looks like an amateur effort, snagged an audience award at Sundance and was a Festival Favorite at SXSW. The buzz is growing, too, thanks to yet another request from Birbiglia. When he noticed the film was slated for release in only a few dozen theaters nationwide, he was nonplussed. He took to Twitter, while Glass tapped into his radio audience, and both suggested that moviegoers contact theaters where IFC Films (which bought the rights to “Sleepwalk With Me”) typically screens. The response was immense to the point that “Avengers” director Joss Whedon made a tongue-in-cheek video announcing his concern that the low-budget film might outpace his summer blockbuster.

“We went from being booked in 34 theaters to being booked in 125,” Birbiglia said. “It’s like a movie people are getting to see by demand.”

And in that way, Birbiglia is teaching his fans a little bit of his grass-roots wisdom: If you want something, try asking nicely.

“Sleepwalk With Me”

Opens at Landmark’s E Street Cinema on Aug. 31.