My role for the first 15 minutes was to sit there poleaxed, thinking may-be he is brain-damaged. He was chattering 19 to the dozen, pulling faces, switching voices, sometimes talking in camp actor tones, sometimes shouting like he did in The Young Ones, sometimes putting his face close to mine and whispering, then leaping up and pacing about, striking poses, hugging himself, then throwing himself back in his chair. And whenever he forgot a name he shouted: 'Come on, brain!', which certainly made me go 'Ouch,' thinking of the terrible brain trauma when he fell off his quadbike and was in a coma for five days. He was telling endless luvvie anecdotes, hopping from one to the other, dropping names which meant nothing to me, generally 'wibbling' as he calls it, determined not to let me get a word in edgeways. But gradually I was able to lob in the odd question and, even more gradually, he started answering them in his own elliptical way.

At one point he said, movingly, 'Can't you see? I'm frightened of interviews. I'm so frightened, I'm making you nervous.' And it was true. Of course he is extra frightened of interviews now, because he hates talking about his accident; but he was always frightened of interviews, saying, 'I don't want people to know who I am.'

Ade Edmondson says he always lies in interviews anyway, to make himself more interesting. Like most actors, he thinks he's boring; like most actors, he's more obsessed with his career than he wants to let on. But, unlike most actors, he is terrified of sounding pretentious - he has a mental audience of fellow comedians ready to fall about laughing if he says anything serious. So whenever we approach serious ground, he leaps up and creates a diversion - once, most alarmingly, by rolling the top of his ear lobe and pushing it into his ear.

We were on the stage of the Richmond Theatre, because he was doing a play there, A Family Affair. It has been on tour, but will not come the West End, because he starts filming Harry Potter in January. He is very excited about doing Harry Potter , even though he has a small part (Peeves), because ' Everyone is in it!' But he is even more excited, in fact deeply heartfeltly grateful, to be back on stage. A Family Affair is the first theatre work he has done since his accident and marks an important milestone in his recovery.

Annoyingly, though, we are supposed to be talking about his new children's film, Merlin, The Return, which comes out at Christmas, and there is a film company PR hovering about to make sure that we do. At one point, the PR pops out and Rik starts raving about the theatre, and then, as soon as the PR returns, he switches smoothly mid-sentence to, '... and that's why Merlin was my happiest film experience'. But, actually, he filmed it over a year ago - it was one of the first things he did after his accident - so it is ancient history now and there is a lot of, 'Come on, brain!' while he struggles to remember the names. Anyway, it's an engaging film, with lots of sword fights and battles and horses, and brilliant special effects. His own children, Rosie, 13, Sidney, 11 and Bonnie, 4, all loved it - 'And not just because Daddy told them to.'

But he says it's been really odd, doing this theatre tour, that so many people have come up to him and said, 'Ah, Rik, it's really nice to see you back,' when he thinks he's been back for two years. But mainly he's been filming abroad, and some of the films haven't come out yet. The accident, which almost killed him, happened in April 1998, soon after his 40th birthday. He had just joined his family at their holiday home in Devon and went off for a ride on his quad bike.

Shortly afterwards, his wife glanced out of the window and saw the bike upside down in the yard and him unconscious underneath it. He had suffered a fractured skull and two brain haemorrhages. There were doubts at first about whether he would live, and then about whether he would be permanently brain damaged.

He woke from his coma to see his wife Barbara, his parents, and his old friend Ade Edmondson all in tears round his bed. Over the next few days in hospital, he thought he was being held prisoner and kept trying to escape - once he asked his son Sidney, then aged nine, to bring a getaway car. When he was transferred to a hospital in London (pulling faces and mooning out of the ambulance window en route), he did escape, walked out and got a taxi home. His wife pretended everything was fine till he went to bed, then called an ambulance and got him back to hospital.

For the first few weeks, he was high as a kite, with an attention span of zero and a habit of scrambling his words - he would ask for a bike when he meant a biscuit, and (a good Freudian touch) asked his wife for some lesbians when he wanted a piece of paper. Ade Edmondson says that in the first weeks he made good progress but then he seemed to stick for a long time at a sort of eight-year-old phase, and everyone was desperately worried that that was as far as he'd get. But then he started improving again and, eventually, five months after the accident, was able to think about work.

He says that his 'primary terror' all the time he was convalescing was that he would never be able to act again - and acting was all he had ever done. So it was a nervous moment when he sat down with his beloved agent, Aude Powell, and went through the job offers. 'It was really brain-shredding. I didn't know whether I'd be able to read and be in character. And I did a little voiceover for some kids' stuff and I had to play two frogs - which, at the time, felt demanding - because one of them talked like this [deep voice] and one talked like this [squeaky voice] and it was quite, you know, technical . So, that was making me nervous. But I went in and did it and I've never been so fucking happy in my life! That was September 1998 and I thought I can fucking do it! My life was back.'

He did a cameo spot in BBC1's Jonathan Creek, then made the film Guest House Paradiso with his old mucker Ade Edmondson. Ade directed and arranged the schedule so Rik could do most of his scenes in the morning, when he was at his best, then have lunch alone and sleep. And he organised a masseuse to loosen him up for the fight scenes. 'Ade was just really - but discreetly - caring. Well, of course he was, he's my best mate.' Unfortunately, the film was panned, but that doesn't seem to have bothered them - they are now planning another excremental epic about sending shit into space. One of the great advantages of being at the Richmond Theatre, Rik says, is that Ade lives nearby and they can write together again while Ade's wife Jennifer Saunders is off touring with Dawn French.

Ade said last year that Rik was 'still slightly odd. Not odd, but his memory is not the same and he finds it difficult to concentrate if there is more than one stimulus in the room.' I noticed the latter while I was talking to him - a car alarm went off in the street and he yelped, 'Whadda fuck is that?' and was very jittery till it stopped. Also, he suddenly started pronouncing the name of the film Merlynn , though maybe he was being funny. Once or twice, he seemed to have lost the conversational plot and started re-answering questions he'd answered earlier, but I imagine he was always pretty scatty anyway.

But obviously there are, he says, differences in his life now. He likes to spend silent time alone, drawing. 'I'm afraid it's not very rock'n'roll. I'd like to say to relax I steal cars and get out of my face on crack and rob banks, but I don't - I doodle, I draw. I like expressing myself. I'm just very very interested in me , I'm afraid. Pathetic, isn't it?' And he likes solitude more than he used to, perhaps because of the accident, or perhaps simply because of ageing. 'When you're an experienced celeb - which I am - you sometimes just need a bit of space, when you're not "on". I'm always on! I'm walking down the high street and someone might come up and say, "Hello, Rik!" And do I want to say, "Fuck off?" No.'

Another major difference is that he can no longer drink because he is on anti-epilepsy pills, Phenytoin, which stop working if mixed with alcohol. He was a very happy drinker before - 'I liked to get pissed, misbehave, get overexcited and mess about. But I wasn't drinking a bottle of vodka for breakfast. I wasn't pissed when I fell off the bike.' And now he feels that staying sober is a small price to pay to avoid epilepsy. 'If you've ever had an epileptic fit, it's really fucking terrifying, because you don't know where you're going, your systems fail you. We're in a very difficult area now, because it's in my interests as an actor not to say that I am liable to epilepsy. Because otherwise people might say, "Oh, I was going to ask him to play Hamlet!" But I have had a couple of seizures. And it's always when I forget to take the pills.'

The first was last year, when he was in a recording studio, luckily very near his house in Ladbroke Grove, west London, and felt peculiar. He said he'd better go home and someone walked him to his front door, and he went upstairs and got as far as his daughter Rosie's room and lay down on the bed. Barbara was out, taking the kids to school, and when she got back, 'She heard, "Doongadoongadoonga..." from upstairs and she goes upstairs and she realises it's coming from Rosie's bedroom - "Doongadoonga" - and she looks through the crack in the door and there's me on the bed banging up and down and she thinks, "No! No ! Surely not! Wanking on our daughter's bed? I'll have to shoot him!" And then - she says this by her own admission - she thought, "Oh, thank God, he's only having an epileptic fit!" [He recounts all this with roars of laughter.] So she called the ambulance boys and they came in and smacked her because she had her finger in my mouth trying to stop me biting my tongue - mustn't do that, because these people are strong !

'So, next time it happened, I knew what was coming. I was at Gatwick airport, flying out to Canada to do Kevin of the North earlier this year. I shouldn't be telling you this, really, but I will. I was by the bookstall, and I couldn't tell the difference between colour and sound. I could see the colour of sound, and I could hear the things I could see, and I knew it was declining, my ability to understand what was going on. And I went up to a complete and utter stranger - whoever it was, thank you - and said, "You've got to help me." I had to decide what to say, and think how to say it - "You've got to help me" sounds easy. I got it out somehow, and then I collapsed.'

Anyway, he says, 'It turned out fab,' because the film company paid for Barbara to accompany him to Canada and she brought Bonnie, the youngest, and they all had a good time. But, obviously, epilepsy remains an ever-present worry. He will have a three-year check-up next Easter, and perhaps slowly come off the Phenytoin, but he would rather stay on the pills and not drink than risk another fit. 'I mean, yeah, it's a bit of a complete fucking nightmare drag not to have a pint, but I have found a way of taking great pleasure in it. I have never woken up with a hangover, which is great. I am cleverer, fitter, healthier. I have more coherent time. I'm very very happy now.

There's also something - whether it was my parents, or my school, or my friends - that has taught me, or bred me, to be optimistic. And combative. So that when something shitty happens, the very fact of dealing with it is good for you.'

Suddenly he breaks off irritably, and says, almost to himself, 'I'm constantly talking about this - yayayaya. That's my next job - to give up cowardice.' Cowardice? 'Because I should be nicer to myself than that. I mean, stop apologising. I'm frightened of being interviewed, can't you see?'

I think I see - he wants to give up the cowardice of always being too nice, too obliging; he wants to gain the courage to tell people like me to fuck off. He resents being made to be serious. He was never meant to be a thinker - when he left school, he threw his satchel into the River Severn and vowed never to read a book again - he wants to go back to being a happy little airhead. But, of course, ageing is against him, quite apart from his accident - he can never be that careless innocent again.

It is very striking, reading his old interviews, to see how often before his accident he used to say he'd had a charmed life. He told The Mail, in 1993, 'I had a very happy childhood, happy teenage years and I was famous by the time I was 22. A charmed life.' And he told The Independent , 'My tradge as a celeb is that nothing terrible ever happened. I've just had a very nice time.' He grew up in Droitwich, Worcestershire, with an older brother and two younger sisters. His parents were both teachers - his father was head of drama at a teachers' training college, and encouraged him to act. Aged eight, he had to come on stage as a beggar boy and rummage in a dustbin and find a bar of chocolate and smear it round his face, and he got a big laugh and everyone was pleased so, naturally, he thought, 'This is the job for me.'

He had a happy time at King's School, Worcester, and then he read drama at Manchester University and teamed up with Ade Edmondson and wrote The Young Ones and was a star by the time he was 22. There was one messy period when he was having an affair with Barbara Robbin, a make-up artist, while still living with his first partner, Lise Mayer, and they both got pregnant at the same time. He ditched Lise, married Barbara, and Lise lost her baby. But Lise eventually forgave him and he is obviously deeply happy with 'my Barb'. So, yes - a charmed life.

But it is quite unusual to go round saying you've had a charmed life - most people who've had one take it for granted. But, he explains: 'I've always tried not to be complacent. Because I think good lefties are not complacent or, if they were, they would try to get rid of it. Not that I am a red exactly, but...' And he suddenly leaps up, worried that he is getting too serious, and starts shouting, 'I am deeply honoured and proud of the fact that Benjy [Ben Elton] and Harry [Enfield] got asked to No 10 Downing Street, and they didn't ask me. Yeah! Yeah! I'm still too fucking dangerous! The only reason they didn't ask me is because I might be baaaaaad !' And he leaps around the stage, strutting and snarling and sticking his crotch out like Rick in The Young Ones.

I sit there, smiling indulgently, thinking, why does he do it? This was a question that puzzled me even when he was in his thirties, and even more now he is in his forties. Why does he keep going back to this role - be it Rick in The Young Ones or Rich in Filthy Rich and Catflap or Richie in Bottom - they're all the same, really. It seems to play the part in his psyche that, say, Dame Edna plays for Barry Humphries. It is a role - but it's a role that he also uses in real life, as a way of being rude and aggressive without being offensive because he is 'only joking'. Is that why he does it - as a form of release? 'Yes - all that evil stuff, the violence and so on - you can't just leave that bit, it's got to come out.'

But it has another effect too - it's a way of sort of desexualising himself. He is an extremely handsome man - in fact mesmerisingly attractive - but it is as if he doesn't want people to know it, or as if he doesn't want to acknowledge it. His handsomeness came as a revelation when he appeared as Alan B'Stard in The New Statesmen - I remember thinking then, 'My God, he could be a sex symbol!' But he immediately reverted to another Rick role with Ade Edmondson as if he wanted to obliterate that idea.

Often, throughout his career, he has shown the potential to be a very good straight actor. Richard Eyre, who directed him in The Government Inspector at the National Theatre in 1985, found him 'prodigiously gifted, intelligent'; Harold Pinter, when he saw him in Cell Mates, said he was the 'bee's knees' and Simon Gray, who wrote and directed the play, said he was 'a great actor, and a valiant man'. Time and again, he has surprised critics by being able to play serious roles better than anyone expected (he was particularly good as Mickey Love, an ageing game-show host, in his series Rik Mayall Presents), and yet time and again, just when he seems on the brink of being taken seriously as an actor, he reverts to rock bottom with Ade Edmondson.

The usual theory is that this is out of loyalty to Ade, who has never really developed a solo career, but I'm not so sure. Rik obviously loves Ade deeply and says unblushingly that their on-screen relationship is like a marriage, with him as the wife. He also seems to respect Ade as the greater intellect - Ade, he always reminds interviewers, got a 2:1 from Manchester, whereas he got a 2:2. It seems crazy that it should matter 20 years down the line, but evidently it does. Ade is brighter, he insists, and also more organised.

'He looks after me and I look after him, but he doesn't really need me to look after him - except to be his mate. Without being too sexist about it, he's the bloke and I'm the girl. I'm technically incompetent but emotionally believe myself to be in command. He is technically extremely competent and actually in command, but far too wily to let me know that. But it's a complete 50:50. He types, I pace.' So will he and Ade go on writing lavatory humour till they drop? Yes , he roars, 'It's not all lavatory humour! Some of it's violent! We're growing older now and we need to do something about being old and violent and angry.' And, as he has already admitted, he needs the release for 'all that evil stuff'.

But, I told him, you are handsome enough to have had a straight-hero career - 'Yes. Go on!' he beams - but you seem to deliberately sabotage it. 'Ah well,' he says, suddenly dropping all his shouting and diversions, 'You've got me all serious now because you said I was handsome. Um. I've only ever done what I wanted to do. And I'm not being falsely modest when I say I'm not the world's most intelligent man. I'm much more emotional than I am cranial. And I'm probably not capable of having a plan. I never wrote The Young Ones because I wanted to be Alan B'Stard later. I never wanted people to think I'm sexy. I think it embarrassed me, actually, wanting to show off, display how gorgeous and lovely I am. I could not do that!'

Why not? Because Ade would give him a bad time? 'Oh, damn right! But so would the audience. If I had set out purely to be attractive, desired , then I would have gone out of fashion by now. I would have been, oh, the face of 1984 - and now what I am going to do? All I really want is - fucking hell this is going to look so wanky! - but it's true. Like Henri, in this play, [ A Family Affair ] is a lonely, selfish, resentful, unhappy man and - forgive me - but it's emotional exercise, it's like going for a run, taking your emotions for a workout. Or finding things out about yourself. Stage acting especially - the beauty of stage acting is that you don't have a commander. There's no one getting you up at four in the morning and saying, 'What I want you to do, Rik, is stand on that mark, then look to the right, a little wistfully. OK?' And that's your fucking work for the day! But with the audience, it's: "I think I'll get everyone to think I'm great." I like doing what I do, and I don't like being told what to do. But circumstances have forced me to. No ! They haven't! I'm very fierce about my independence.'

Oh, I have got the hang of him now - he meant to say circumstances have forced him to do films rather than plays since his accident, but he won't say it because it sounds self-pitying. And also, as he is dutifully aware, he is supposed to be publicising Merlin . As if on cue, the PR interrupts to say the photo-grapher has arrived. I try to delay my farewell by asking for a glass of water, and Rik says 'Yes, me too, but I'll have slightly more than Lynn. Because I am famous .' As soon as the PR has gone, he starts raving again about having an audience - 'It's so sensual. You can feel what might make them sad, or excited, or scared - you sense them, you find out what they're like. It's intercourse! Because I give them what they want and they give it back to me.' And then the PR comes back and he switches smoothly to talking about Merlin and then it is time for me to go - just when I was beginning to delude myself that I understood him.

 Merlin, The Return opens on 22 December.