You live with somebody 25 years, you get to know them, especially if they're the last thing you see before you fall asleep at night. Johnny Carson is often written about as though he were some inscrutable mystery man. Perhaps there is precisely as much to him as meets the eye.

He has been meeting the collective, albeit half-opened, American eye for an amazing quarter-century as host of NBC's "Tonight Show," thus achieving a longevity in television that verges on the miraculous. The feat will be celebrated with a 90-minute special tonight (at 9:30 on Channel 4) and with the rebroadcast, tomorrow night at 11:30, of an edited 1973 "Tonight Show" that Carson considers one of his best.

A friendship that lasts 25 years is exceptional. A marriage that lasts 25 years is a rarity (it certainly would be for Johnny). Being famous for more than 15 minutes is practically immortality. When Carson took over the "Tonight Show" in 1962, "Leave It to Beaver," "The Flintstones," "Dobie Gillis" and "Sing Along with Mitch" were all part of the network prime-time lineups.

John F. Kennedy was president. The Zip Code was still a year away.

Fads, fancies, administrations, competitors, space expeditions, network executives and Mrs. Carsons come and go; Johnny remains. He is the national comedian. And the national smart aleck. He bobs buoyantly in the mainstream and blithely avoids the rocks and shallows. He's fascinating, but only to a skillfully modulated degree; one never tires of being mildly fascinated by him.

"I don't find myself difficult to understand," Carson says ingenuously. "I'm not basically a public person. It's like Gleason said, if you go out all the time, at restaurants and so on, people say, 'Oh, he's everywhere,' and if you stay home and eat dinner, they say, 'Oh, he's a recluse.' "

Oh, he's a recluse, who bounds out each night and faces 8 million people. The convivial retinue that surrounds him on the program -- sidekick Ed McMahon, band leader Doc Severinsen, producer Fred De Cordova -- looks a trifle ancient; Johnny stays young, beguilingly bratty, still a kind of skinny, squinty kid who gets away with naughty jokes late at night, when the network and the establishment are asleep.

Network spokesmen said Johnny was turning down all interviews, and even several magazine covers, despite the seeming momentousness of the occasion. But Carson's publicist, Jim Mahoney, suggested, "Call him up," and a call was made. And soon, from his Malibu home, Johnny phoned, saying he'd accidentally dialed "some senator" the first time he tried.

"I've been sitting here trying to figure out if I get a gold watch from the network, or what," Carson said jauntily of the impending anniversary. In fact, NBC Entertainment President Brandon Tartikoff is today supposed to deliver unto Johnny an inscribed crystal sculpture. Network chiefs used to appear on the Carson show at anniversary time to congratulate him. "I put a stop to that," says Carson. "It got damn embarrassing. That mawkish moment when they'd make their little speeches -- awful."

A logical question to ask a man who has survived 25 years at the same post in one of the most volatile businesses ever is, how much longer? "You know honestly, I don't know," Carson says. "If the ratings went belly up, and we were coming in second, and it got to be a drudge, then, I think, you've got to quit."

Occasionally, the ratings do dip, and the other networks imagine they're making dramatic inroads. But Carson bounces back and remains number one, handily bumping off such challengers as Joan Rivers, Alan Thicke and David Brenner -- and that's only in the past few years. "The ratings are cyclical in a way," Carson says. "And there's so much more competition. But I think basically they're higher now than they were six or seven years ago."

In 1976, Carson said, semiwearily, "I'm 50 now, and I am sure I won't be doing 'The Tonight Show' in 10 years. I doubt if I'll be doing it at 55." He is 61. Then there was the panic of '79, when Carson started hinting loudly that he wanted to retire, and disappeared from the program for nearly three weeks while network executives rended their cashmere.

What about those times?

"I lie a lot," Carson says. "No, actually, there are times you really do have it in your mind to hang it up. I know there were times when I still did the show five times a week, an hour and a half a night -- an hour and three quarters when we first started -- and it was just intolerable. You get to the point where you don't know who you're talking to.

"But I'm still having fun with it. And my level of boredom is rather low. I have no desire to stay home and spend my life hitting tennis balls around."

Under his new contract, Carson only does new shows three nights a week, with Jay Leno and Garry Shandling, both likely successors, filling in during his many absences. Technically, "Tonight" is a talk show. Carson has always liked to think of it as a comedy show. But what it has become, of course, is the Carson show. No matter how adept the replacement (and Leno has had sterling, funny moments), Johnny is missed.

He's not only the night light, he's the security blanket.

What keeps him going? It can't be the money. He has so much that more can't matter. Forbes ranked him 10th on its recent list of the highest grossing entertainers, estimating his 1986-87 income at $40 million. Carson's Malibu home is so vast that upon entering it one day, pal Bob Newhart asked, "What floor is the gift shop on?"

When he was NBC chairman, Grant Tinker estimated that the interior of the house took up an entire acre. Carson huffs, "Network executives tend to exaggerate." But he concedes that he bought a house across the street while it was under construction and had it torn down so that he could put up his own tennis courts.

Carson probably stays on the show because doing it is like oxygen to him, the breath of life. However enshrined, however rich, however indomitable he may be, he still has to go out there, stand at ground zero and get laughs. The old-fashioned way. Part of the ritual is watching him squirm when the laughs don't come, an infinitely renewable source of amusement in the way Oliver Hardy's exasperation was or Jack Benny's longing stares were.

But the opening topical monologue has content as well as style; it's the show's most indispensably Carsonesque component. People don't just watch the monologue, they study it for barometric readings on figures and issues in the news, they use it to chart the trajectories of the rich and famous.

Washington pundits mutteringly wondered if Joe Biden's campaign would be hurt by plagiarism charges when they first emerged. They should have watched Carson that night. Carson and his writers were on top of the story. "Biden went in to his campaign workers," Johnny said, "and he told them, 'Don't worry. We have nothing to fear but fear itself.' " Biden was an instant laughingstock. Biden was instant history.

It was over for Gary Hart when Gary Hart became a nightly fixture in the Carson monologue. The roar of the crowd was heard in the land, but not the kind of roar politicians like. In the earliest days of Iran-contra he was definitive, and has since been much imitated: "I guess the question is, what did the president know, and when did he decide he didn't know it?"

"It's hard to be funnier than what's happening, sometimes," says Carson, who in the year of Hart, Biden, the Bakkers, Oral Roberts and Fawn Hall has had one field day after another. "It's one of the most enjoyable parts of the show for me, coming out there and having a piece of material you can't wait to do, being day and date with the headlines," he says.

But he balks and scoffs at intense interpretation of the monologue and its effect on public careers. "I never analyze it," he says. "I never analyze the show. Analyzing it would be a wasted exercise. I just go out and do it. Like George Burns said, 'If it gets a laugh, it's funny.' "

Jack Paar's "Tonight Show," which preceded Carson's, was as hot as Carson's is cool, a teapot for innumerable tempests. Once his monologue is over, Carson is not interested in topical guests or, really, in the latest controversies.

"We were offered Jessica Hahn," Carson says. "I turned her down. I said I thought there was only one direction you could go with that, which would be to ask her about what she did with Jim Bakker and that sort of thing, and that just looks like sleaze. And I turned down that other airhead, the one with Peter Holm, the girl who fainted on the stand," Carson says, referring to an incident at the lively Joan Collins divorce trial. "We do have some standards. They may be low -- but we have them."

Carson is not uninterested in the news, however. Asked if he ever tunes in his competition, "ABC News Nightline" with Ted Koppel, he says, "Yeah, I watch Ted. In fact, I called him after the show with Jim and Tammy Bakker. I kidded him. I said, 'Knock it off, will you? I can't compete with those two dimwits.' I told him I was going to book Charlie Manson. Maybe the ayatollah."

Koppel remembers the call. "He was very gracious and very funny about it," Koppel says.

Like Carson, Koppel sometimes peruses the competition, although since "Nightline" is live at 11:30, when Carson airs, Koppel can only see it on his night off. He is flabbergasted by Carson's durability.

"I have a small idea of what it's like to do a show night after night," Koppel says. "Clearly the public knows and loves Carson for it, but unless you're in this business, you really can't appreciate what a simple act of endurance it is to do it for so long, let alone at the high level of quality he's been able to maintain.

"He rarely has a program that really goes into the tank," Koppel says. "At his worst, he's better than anybody else doing that kind of thing."

Carson has been in and out of the news himself during most of the 25 years of his reign. The latest litigation to come his way is a $5 million suit by a dentist who claims Johnny defamed his profession with jokes in the monologue. Johnny can sue as well as be sued; he was successful in halting the production of portable toilets named "Here's Johnny," after Ed McMahon's famous nightly herald cry.

Arrested for drunk driving in 1982, Carson pleaded no contest. Earlier he was an investor in John DeLorean's ill-fated sports car company. All these public doings of a private man have found their way into his monologue, part of a purgative self-deprecation.

In March 1981, Carson took the unusual step of denouncing a National Enquirer story on the air, insisting its claim that his marriage was crumbling to be "absolutely, completely, 100 percent falsehood." The following year he joked, upon returning to "The Tonight Show" after threats to retire, "If I stayed at home, Joanna would kill me." One year later, the two were divorced.

Her alimony demands became more monologue material. In June, Carson married for a fourth time. He agrees he is one of those people who just have to be married. "I guess so. It's probably true. I think I've got a handle on it now, though. Certainly I've had plenty of practice." He met the fourth Mrs. Carson, Alexis Maas, strolling on the beach near his Malibu home.

We all know this stuff. We know he had a bout with the bottle earlier in his career, we know he started as a magician and loves astronomy, and we know he nervously adjusts his tie and scratches his hand and taps out rhythms on his desk with pencils. This is basic Johnny lore. The question of what Jack Paar was "really like" obsessed the country for five years, but with Johnny, we really feel we know. He's a fairly normal, ordinary, WASPy guy from the Midwest who happens to be mildly intriguing and wildly funny.

You can relax with him. You'd better be able to relax because you may be naked as you watch him from bed. You're vulnerable. He knows that. He doesn't threaten or grate. And in a way, he's naked too.

He also wears better than anything you could get from L.L. Bean.

Over the years there have been many stories about the way Carson intimidates, perhaps even terrifies, network executives. Annual revenues for "The Tonight Show" have been estimated at more than $100 million; no single NBC program is more profitable.Network sources insist Johnny is not feared, only respected. They concede, though, that no executive would dream of calling Johnny up and suggesting changes in his show.

Carson denies that he has banned some performers from returning to the program after they offended or angered him during a visit, or because of something they said or did elsewhere. Carson has magnanimously welcomed former competitors Thicke and Brenner as guests. But impressionist Rich Little has complained for years that Carson no longer allows him on the show. To this, Carson will say only, "Life is too short to get involved in these petty squabbles."

The standard line about Carson is that he's detached, cool, distant, aloof. All true. Kenneth Tynan observed Carson at a Beverly Hills back-yard party while preparing a 1977 New Yorker profile. A young actress remarked, "He looks like Gatsby." Tynan thought there were similarities: "Gatsby, like Carson, is a Midwesterner, a self-made millionaire, and a habitual loner, armored against all attempts to invade his emotional privacy.

" 'He had come a long way to this blue lawn,' Fitzgerald wrote of Gatsby -- as far as Carson has come to these blue pools, from which steam rises on even the warmest nights."

There's obviously an Everyman quality to Carson's nightly struggles, a heroism even. He is asked what he might have been if he hadn't heard the call of comedy. "I've often wanted to be a sniper," he says instantly, then nervously wonders if the joke will be misinterpreted. "Or, a sheepherder," he adds. "Actually, the aluminum siding business has always fascinated me."

We do worry -- it's only natural -- when we tune in and everything is going against him, the audience is not responding, the guest is sitting there like a damp lump, the monologue has bombed. We may worry, but he says he doesn't. "There's always the next night," Carson says. "We don't live or die with every single show."

One night at a time, for 25 years, Johnny Carson has stayed above the fray. It is frightening to imagine facing the fray without him. On "60 Minutes," Mike Wallace asked Johnny to write his own epitaph. His suggestion: "I'll be right back." One can hope.