Jim Carrey has shied away from the wild and crazy routines of early days in his more recent movies, with ever-diminishing results, while Will Ferrell, among others, has gone the goofball route with great success. So perhaps it’s understandable that with “Yes Man” Carrey returns to his roots with a script that even the least observant filmgoer will recognize as an obvious variant of his decade-old smash “Liar Liar.”

In that movie, of course, Carrey played a lawyer who couldn’t tell even the smallest fib, thanks to his son’s mystically powerful wish. Here, he’s a divorced bank loan officer named Carl, who’s persuaded by a cultish motivational speaker to change his unhappy, lonely life by overcoming his penchant for declining every invitation and instead saying “yes” to everything and everybody, in both his private life and his job. Of course it’s a decision that does him a world of good even though it lands him into plenty of madcap situations before he learns the lesson of openness and balance.

It’s possible that had this premise been shrewdly fleshed out, “Yes Man” could have been clever, perhaps even insightful. But as developed by no fewer than three writers from a novel by Danny Wallace, it comes across as nothing more than a series of labored sketches in which Carrey flails about trying to recapture the zaniness of his early years. It’s a sad spectacle, rather like watching Jerry Lewis playing the shrieking adolescent well into his forties.

And the business the trio of scribes have devised for him is of very low quality. There’s a romance, of course, with a ditzy free spirit named Allison (Zooey Deschanel) who’s both a singer in an atrocious “cutting edge” band and a combination exercise trainer-photographer (two ideas that are so equally bad that the writers apparently couldn’t decide between them). There’s also repeated interaction with a goofy boss, Norman (Rhys Darby), a nutty Brit with a pathetic need for friends who rejoices in making up idiotic nicknames and hosting movie-themed parties for geeks like himself in which guests dress up like characters from “Harry Potter” or “300.” Another dismal subplot deals with the impending marriage of Carl’s best buddy Peter, played by the blindingly bland Bradley Cooper (and who, together with another pal, Rooney, played by Danny Masterson, represent overage versions of the sort of immature sidekicks familiar from every Judd Apatow movie ever made). Even the throwaway episodes—like Carl’s intervention to save a suicidal guy on a ledge (played by an uncredited Luis Guzman)—just lie there. And the subplot about his giving small loans to oddball applicants, collateral or no, comes across as a mite unnerving in this age of fiscal collapse.

So it’s no surprise when the level of invention sinks to near-degrading levels. A bit involving Fionnula Flanagan as Tillie, Carl’s randy old neighbor, is just icky (the same gag was employed far more successfully by the Farrellys in “Kingpin” a long time ago). By the time that Carrey is riding through the streets of Los Angeles on a motorcycle clad only in a hospital gown, so that we get to see brief glimpses of his exposed derriere as he does wheelies and other assorted tricks (courtesy of stunt men and poor CGI work, of course) on his way to Allison, one feels that a comedic nadir has been reached.

Nobody fares well in this joyless misfire—not Deschanel, whose quirkiness quickly grows irritating, nor Darby, who’s supposed to be hilariously silly but is simply grating, nor Masterson, who comes across as a loser in every respect, nor even Stamp, who bellows out his rants so bombastically that you expect him to pop a blood vessel. And certainly not Peyton Reed, whose slack direction shows none of the finesse he once exhibited in “Down With Love.” Nor does the picture aim for that one’s technical sophistication. The physical production is mediocre, as is Robert Yeoman’s cinematography (his surname seeming all too accurate).

A title like “Yes Man” almost demands a snarky put-down. Think up one of your own; they’re all bound to fit.