When Ronald Reagan told Queen Elizabeth, let me show you and Prince Philip my California, she reacted the way you'd expect anyone would to an invitation from Hollywood's most famous leading man. She accepted.

Reagan extended his and Nancy Reagan's invitation last June at Windsor Castle, after the queen complained that her family gets to travel all over the earth and have fascinating experiences, but the only trips she ever gets to make are grand but rigorous state visits.

"Prince Philip goes off to save the gub-gub bird from extinction and Prince Charles gets to meet the aborigines," explained a White House aide. "The queen said she wanted to go to Disneyland and be as close to having a real look-see as she could."

As it turns out, she won't be going to Disneyland, but there are compensations in store as she moves northward between her state visits to Mexico and western Canada. One will be on the same 20th Century-Fox sound stage where the 4077th "M*A*S*H" unithas been lambasting and lampooning the Korean War for the past 11 years.

There won't be any "Swamp" around because "M*A*S*H" will have folded its tents by then. But there will be 400 of Hollywood's Finest--sans black tie--sitting down to dinner with the queen and Prince Philip. Coincidentally, the Feb. 27 dinner is the night before the antiwar military sitcom's final episode--two hours long--is aired on nationwide television, forever winding up the show's prime-time production.

The White House isn't yet telling whether Hawkeye, Hot Lips Houlihan, Frank Burns, Klinger, Colonel Potter or any of the other "M*A*S*H" stars are being invited to the dinner. But they all know at least one member of the royal family already. Prince Charles visited the set on his trip to California several years ago.

Reagan aides who were preparing for the queen's visit to California last month saw Alan Alda and Co. in rehearsal on Stage 9, where the show's four principal sets--the operating room, the mess tent, the commanding officer's tent and that most famous of all canvas bachelor pads, "The Swamp"--were still intact.

A "M*A*S*H" spokesman said yesterday that sets will come down when filming ends around Jan. 18 or 19. Under consideration, though nothing has been signed yet, is a plan to ship portions of the sets, including "The Swamp," to the Smithsonian Institution here for permanent enshrinement with other TV sitcom memorabilia, such as The Fonz's leather jacket and Archie Bunker's chair.

A White House official says even if there are no tents for the queen to inspect, Stage 9 won't be entirely without atmosphere. In addition to a cyclorama--a curved backdrop--inside the stage, "cameras and booms and that sort of thing" will be everywhere.

"M*A*S*H" is big telly in Britain, with episodes lagging only about a year behind those in the United States. It's aired in the evening, conceivably well ahead of the queen's bedtime. An acknowledged fan of the now-defunct "Kojak" series, the queen met its star, Telly Savalas, at the White House dinner then-President Ford gave for her in 1976. Nobody is yet saying whether she is a fan of the popular, if sometimes controversial, "M*A*S*H."

"Certainly, the royal family are keen television watchers," a diplomatic British Embassy spokesman said yesterday.