I have always had a soft spot for Steve Martin. A bit like a bruise. After all, he was a good comedian as comedians go: quite charming, quite amusing, quite pleasant. But, as comedians go, he sort of went. He continues to make movies, of course, but tastes have changed. It seems that his doughy features, comforting nasal voice-overs and zany sense of humour have become just a little too benign to interest the over-12s. The upside of being now equably nice, though, is that he retains the rare and endearing quality of the wholly inoffensive: like a cheese sandwich, you can't really hold anything against him.

In his reinvention as novelist, however, Martin is making a canny move. For there is a certain novelty value in reading a book written by the man who once made an entire film wearing a suspiciously large prosthetic nose. And as Roxanne (his Hollywood remake of Cyrano de Bergerac) showed, novelty is what he does best. The Pleasure of My Company, which is, in fact, his fifth venture into published prose, sees a return to form: it is sweet, funny, slightly haphazard and ultimately quite good.

Daniel Pecan Cambridge, a genius rejected by Mensa after they inadvertently omitted the 1 at the beginning of his IQ, is plagued by Obsessive Compulsive Disorder. Everything must be logical, symmetrical, explicable and quantifiable. At any one time, for example, the total wattage of active light bulbs in his Santa Monica apartment must be precisely 1,125. Street kerbs, meanwhile, are the literally insurmountable manifestation of all that is unacceptable to him: even the thought of stepping into the road at any other point than a driveway paralyses him with panic. Not surprisingly, he is unable to hold down a job, surviving on state benefit and the generous donations of his beloved Texan granny.

This does not bode well for Daniel's love-life, nor for any hopes we might have had of a fast-paced, wisecracking, rollicking read. But Martin's narrator holds our interest with his tangential forays into the absurd, and his variously humiliating, anti-heroic antics. His appearance on a crime reconstruction show, for example, coincides with his attempt to seduce the local estate agent.

Likewise, his tan-inducing lighting requirements thwart his neighbour's drunken attempt to seduce him. Instead, he lies compulsively to the student psychiatrist, Clarissa, who visits on Fridays, and builds the mathematically astonishing 'magic squares' made famous by Benjamin Franklin. It is like reading P.G. Wodehouse on acid or Monty Python on Valium: calmly surreal.

But this combination of the bizarre and the banal is clearly the point. In fact, one of the funniest creakings of the plot involves Daniel's submission and consequent success in the Tepperton's Apple Pie Most Average American essay contest, leading to the delightful headline: 'Insane Man Chosen as Most Average American'. Funnier still is the fact that he wins it twice.

Gradually, though, he starts to make his way into the outside world, with the help not of his psychiatrist but of her infant son, Teddy. The plot creaks noisily again, and the three of them embark on a road trip which becomes, inevitably, a journey into self-discovery. Along the way, Martin sets out to prove himself as more than just a comic who can write, and he lays on the significance of the episode fairly heavy-handedly: 'Once I positioned my palm between my eyes and the sun, and I felt this had something to do with Granny, for it was she who stood between me and what would scorch me.' Or: 'What happened under the pecan tree qualifies as one of those events in life that is as small as an atom but with nuclear implications.' Gee. One of those.

But Martin's most successful and attractive qualities are consistently present: self-deprecation and irreverence. Among some conspicuously strained analogies ('My earlier Socratic dialogue with myself about the nature of love had no Socrates to keep me logical') and obvious observations ('People, I thought. These are people. Their general uniformity was interrupted only by their individual variety. My eyes roved around like a security camera'), there are several which sparkle with characteristic bathos: 'I realised Brian was not a cuckold in the grand literary tradition. In fact, he was more like a mushroom.'

Martin is intelligent and, at moments, The Pleasure of My Company displays a surprising sensitivity. But there is no dark side to his clowning: nothing morbid; nothing, bar the occasional split infinitive, which is even uncomfortable. This is light-hearted, quick-witted slapstick; innocent and playful, original and funny. It is the kind of goofball comedy of the naïve which invariably secures Martin's films a PG rating. It is a lot of fun.