Hundreds of familiar orange roofs identifying Howard Johnson's restaurants will be replaced by another well-known corporate symbol -- Big Boy -- as a result of the sale announced yesterday of the 60-year-old restaurant and hotel chain to Marriott Corp.

Marriott said it will acquire more than 400 Howard Johnson's restaurants for about $65 million as part of a larger purchase of the famous restaurant and hotel chain from the Imperial Group, a British conglomerate. As part of the deal, the hotel properties will be sold to Prime Motor Inns Inc.

Many of the restaurants bought by Marriott will be converted into Bob's Big Boy outlets, further accelerating Marriott's drive to capture the No. 1 position in the nation's coffee-shop business, company officials and industry analysts said.

Under terms of the deal, Marriott, based in Bethesda, will first purchase Howard Johnson Co. for about $300 million, including $138 million in assumed debt. Following this acquisition, Marriott will then sell to Prime Motor Inns all the hotels and lodges owned by Howard Johnson and the chain's separate lodge and restaurant franchise system. Prime Motor Inns also will obtain the right to the Howard Johnson trademarks and trade names. The sale price will be about $235 million, the companies said.

With the close of this deal, expected before the end of the year, Marriott will retain 350 Howard Johnson company-operated restaurants and 68 turnpike restaurants, as well as its vending, manufacturing and distribution operations. The expansion represents a significant addition, at a very inexpensive price, to the more than 1,400 restaurants already in the Marriott system, analysts said.

"The acquisition provides excellent opportunities for us to expand and strengthen our restaurant operations," said J. W. Marriott Jr., the company's president and chief executive officer.

R. A. Rankin, Marriott's vice president for corporate relations, said that the company plans to convert a "significant portion" of the newly acquired outlets into Big Boys, a chain of coffee shops that the company has said it plans to expand. He declined to elaborate on the timing or number of restaurants that would be converted.

Currently, he said, there are 868 Big Boy restaurants, of which about one-quarter are owned by Marriott. The rest are franchises. He said that as part of the expansion of this chain, the company is opening a national franchise advertising campaign.

The deal announced yesterday is an effort to rapidly expand the Big Boy operations without the heavy capital expenditures required to build outlets from scratch, analysts said. They said that much of the $65 million the company is spending in the deal should be recouped through the eventual sale of some of the assets acquired yesterday, as well as income from the new Big Boy locations.

"They have been saying for quite some time now that they intend to revamp the Big Boy system and to make it the clear leader in the coffee-shop segment of the market," said Stephen A. Rockwell, who monitors the company for Alex. Brown & Sons brokerage firm in Baltimore. Many of the new outlets are located in New England, the one important section of the country that Big Boy has not penetrated, he added.

John J. Rohs, an analyst at Wertheim & Co., predicted that Marriott "will pick out what they feel are the cream of the crop and commit them to Big Boys," while selling the rest. He estimated the company will keep about 200 of the 350 company-operated Howard Johnson locations it is buying. When the conversions are completed, Marriott will control a Big Boy franchise system that rivals the coffee-shop industry leader, Denny's, in number of units, the analysts said.

This transformation should significantly improve Marriott's earnings, company officials and analysts agreed. Rohs said that yesterday's transaction should add about 10 to 15 cents in earnings per share for Marriott in 1986. Marriott, with sales of about $4 billion last year, earned $5.01 per share in 1984, and Rohs said this should climb to about $6.30 in 1985.

The Marriott empire had its beginnings in an A&W Root Beer soda fountain at 14th Street and Park Road NW that was opened by J. Willard Marriott and his wife, Alice, in 1927. When the cool drinks' popularity faded in the fall with the onset of cooler weather, the Marriotts added a menu of Mexican food and renamed the restaurant Hot Shoppe. Hot Shoppes restaurants remain among the firm's more than 1,400 fast-food outlets. Marriott still held the title of chairman of the firm when he died on Aug. 13 at the age of 84.

Howard Johnson, which was started in 1925 as an ice cream store in Quincy, Mass., has grown into perhaps the most recognizable medium-priced hotel and restaurant chain in the country. It has been on the auction block since last fall, however, because of disappointing earnings it produced for its parent, Imperial Group, a London-based conglomerate with interests in food, tobacco, brewing and lodging.

Imperial bought Howard Johnson for $630 million five years ago, but its sale price today is significantly less because the dollar is a lot stronger. Analysts said they expect Imperial to break even with the sale.

Despite its recent problems, the new owners of the Howard Johnson name predicted they will be able to turn around its fortunes. Through the deal, Prime Motor Inns, based in New Jersey, will acquire about 125 Howard Johnson motor lodges and hotels, nearly double the number of hotels it currently operates. It also will have the right to royalty income from 375 franchised motor lodges and 199 franchised restaurants, the company said.

Howard Kahan, a vice president at Prime, said his firm planned to continue to operate under the Howard Johnson name and colors, which he said are "akin to apple pie."

"Today's news holds enormous promise for each of the operating groups of our company," said Howard Johnson Division President G. Michael Hostage. "While the company will be radically transformed by this sale, each of our operating divisions will be put in a dramatically improved position to maximize its potential."

Hostage, who was executive vice president of Marriott until 1978, will work for Prime in an as-yet-undetermined position, Kahan said.