The sleek white liner glides elegantly across the horizon, the sun's rays bouncing from its decks like the glow of a diamond. Ah, you think from ashore, one of those fabled floating palaces, where indolence is blessed and whims are indulged with a beckon to the pastry cart.

How appearances can deceive.

Oh, you can still spend endless hours aboard your cruise ship lazily sunning in a deck chair, stirred only by the not-infrequent summons to dine. But several major cruise lines are promoting a new image, and their ships are changing.

Picture now, beneath the liner's gleaming exterior: a fully equipped exercise room; a pool reserved for swimming laps; clusters of passengers stretching and bending in aerobic unison; and hot tubs and saunas waiting to soothe aching muscles.

Yesterday's floating palace has become today's floating spa, a gymnasium of the waves.

"We're trying to attract a whole new audience," says Alice Marshall of Cunard, which recently introduced a major physical fitness program to the busy roster of cruise activities on the Queen Elizabeth 2 and its sister ships, the Sagafjord and Vistafjord.

"Health and fitness," she says, "are a part of so many lives. We want to attract the people who have the misconception that all there is to do aboard is eat and grow."

"The average cruise passenger is a younger person, more sports-oriented, more active," says Phil Wilson, sports and fitness coordinator for Norwegian Caribbean Lines, an early entrant in the floating spa business. About four years ago, it began offering a Fit With Fun program on its fleet -- the Norway, Southward, Starward, Skyward and Sunward II.

How pervasive is this latest trend in cruising? Here's a sampling of what's happening:

*Sitmar Cruises is taking fitness at sea quite seriously, even advising its passengers to practice "a little more self-control and a little less self-indulgence" when "surrounded with lavish buffets and tempted by multi-course dinners." The line, whose trio of ships -- Fairwind, Fairsea, Fairsky -- plies the Caribbean and the West Coast, provides supervised exercise and dance classes, a fully equipped gymnasium and diet menus.

*Princess Cruises is introducing its new 1,200-passenger Royal Princess in late November, and it is a ship designed for the spa-minded traveler. When it starts its trans-Panama Canal runs between Los Angeles and the Caribbean, the Royal Princess will offer what it calls "a total health spa": four swimming pools; a large gym with weight and aerobic machines; a quarter-mile jogging track; and after-exercise hot tubs.

*The Royal Caribbean Cruise Line lures its passengers away from the buffet table by awarding them a "ShipShape Dollar" for each fitness activity they attend. The tokens can be exchanged aboard the line's fleet -- Song of Norway, Nordic Prince, Sun Viking and Song of America -- for special "ShipShape" T-shirts and sun visors.

*In addition to its regular fitness program, Norwegian Caribbean has scheduled a special week-long "Fit With Fun" theme cruise from Miami Nov. 24 aboard the Norway. Among the participating celebrities offering advice: former Olympic gymnast Cathy Rigby McCoy, former boxing champ Floyd Patterson and pitcher Rick Sutcliffe of the Chicago Cubs. Additional "mini-fitness" cruises are being planned for 1985.

Travel agents say they have had to become familiar with cruise fitness programs because of client interest. "I get a number of people asking about jogging facilities," says Gail Gunther, manager of Cruises Unlimited of Washington, which specializes in cruises. Many of her clients make their decision on a ship based on how well they can maintain their running schedule.

But is fitness really a possibility in the fairly tight confines of a cruise ship?

Grenville Cartledge, a trim, 30-year-old "hotel officer" on the QE2, nods affirmatively, finishing up a sweaty on-deck game of paddleball during the ship's brief eight-hour visit to New York recently. Last year, he and four shipmates trained for the 26-mile New York marathon while at sea. Their track was the open-air Boat Deck, five times around for a mile.

Up at 5, they ran six or seven miles a morning, finishing about the time the passengers started showing up for breakfast.

Because the QE2 was in port only for a few hours on race day, the runners were ferried by tugboat to the starting gate. Their shipboard training paid off: All five went the full distance; Cartledge completed the course in three hours and 18 minutes.

Take passage aboard the QE2, which is making a series of transatlantic crossings this summer and fall, and you could easily fill your day with physical fitness classes. And at night, after a calorie-conscious dinner, you might join in Cunard's "miles at sea" walking competition.

Passengers post their daily total on the bulletin board, and as the ship nears port the race heats up with couples vying to outdistance each other. Five miles a day around the deck is not unusual, and winners on a two-week Caribbean cruise may have covered 80 miles afoot.

Because of its size -- it has a capacity of 1,850 passengers -- the QE2 offers one of the most complete fitness programs afloat, and one of the most lavish. Passengers are exercised first and then properly pampered by the experienced staff at the ship's Golden Door Spa at Sea.

Introduced on the QE2 in 1982 and expanded last December to the Vistafjord and Sagafjord, the program attempts to duplicate the luxurious amenities of the famous Golden Door spa in Escondido, Calif. (which trains the Cunard fitness staff and supervises its program).

But there is one big difference between the two spas. In California, a week at the spa costs about $2,500 per person, says Katrine Mitzkat, director of the Spa at Sea program. On Cunard's three ships, it's provided without extra charge to all passengers.

Typically, a day at sea begins at 7:30 a.m. with morning warm-up exercises. Forty-minute classes continue hourly until 5 p.m., offering: vigorous exercises to music; water exercises at the spa's indoor pool; a supervised round of the parcours track (jogging and stretching); and yoga. Training with weight equipment is also available.

One of the most-popular classes is "Sit and Be Fit," sweat-producing exercises done in a sitting position and designed for passengers with back problems or who otherwise don't feel comfortable in more strenuous activity. So many people are showing up, says Mitzkat, that Sit and Be Fit sometimes has standing room only.

Afterwards, you can soak in one of the spa's huge hot tubs and follow up with a professional massage.

But the spa's influence reaches beyond its carpeted and mirrored domain on the QE2's Six Deck. Each day's menu carries a box listing the Golden Door's suggestions for weight-watching dining.

As many as 150 passengers a day sign up for at least one of the spa's classes, says Mitzkat, and some individuals will try four or five. "People are so interested in doing something at sea. Many are used to jogging every day. One man was planning to run in a marathon and was very nervous about being on a cruise. He came to all of our classes, and he actually improved his fitness, he felt."

Others participate "so they can enjoy the dining room. They're not looking to lose weight," she says, they just want to end the trip no heftier than when they boarded.

Similarly extensive are the fitness facilities of Norwegian Caribbean's Norway, which at 17 stories tall and six city blocks long (passenger capacity: 1,778) is billed as "the largest cruise ship in the world." A trained staff holding degrees in physical education and exercise physiology schedules classes throughout the day.

In addition to the traditional cruise sports -- shuffleboard, Ping-Pong, swimming and skeet shooting -- the Norway offers wake-up exercises on cabin TV screens, aerobic dancing, basketball, volleyball, jogging on a one-sixth-of-a-mile track, racquetball and handball on an open-air court and swimnastics. Special classes are available for those over 55.

Should that only begin to warm you up, you can move on to the gymnasium for weight lifting or exercise bicycling and end with a sauna and a massage. Films and lectures on health subjects are offered, and your blood pressure is checked regularly.

The sports activity continues even in port. Each ship's staff will help arrange for golf, tennis, board sailing, snorkeling and scuba diving and hand you a map to jogging paths in such ports as Nassau, the Bahamas; St. Thomas, the Virgin Islands; and Cozumel, Mexico.

On the line's private island in the Bahamas, passengers have the opportunity to snorkel in tropical waters under the guidance of qualified diver-instructors. This program is called "Dive-In," and it begins with on-board instructions in the use of mask and goggles. A safety vest prevents sinking, so "Dive-In" is open to anyone aged 6 to 60, whether they swim or not.

Norwegian Caribbean's fitness activities are "very, very popular," says spokeswoman Fran Sevcik. "We've expanded the gym on all the ships and we're continually looking for new programs."

Not all cruise ships offer as wide a program, so fitness fans considering a cruise should ask detailed questions about what facilities and staff are available on specific ships.

Most fitness facilities are on ships that cater to Americans, who tend to be more fitness conscious. But, say spa instructors, the British and the Germans aren't far behind. Caribbean liners, which tend to attract a younger crowd, also seem to offer fuller programs. Another good indicator: The newer the ship, the more varied the fitness facilities.

Sitmar, one of the leaders in fitness cruising, has developed guidelines for passengers who want to avoid gaining weight while aboard. If followed, they could turn practically any liner into a floating spa. Sitmar's suggestions:

*Avoid elevators; use the stairs. It's also the best way to explore the ship.

*Walk the deck to take in the sea air. Meanwhile, you are burning up calories.

*Join in the deck games and tournaments. "It gets you out of the deck chairs."

*Pick shore tours that involve walking instead of riding a sightseeing bus.

*After a big meal, "Go to the discothe que and dance until dawn."

*If the day's schedule lists 10 meals, skip some of them.

*Tell the waiter "no, thank you" when a second dessert is offered.

*At the midnight buffet, take a good look but only choose "the one item you'd really like to try."

Be "realistic" about your goal, says Sitmar. "Don't try to lose weight on a cruise vacation. To maintain your weight is a better objective. That way, you won't miss out on the fun of sampling gourmet foods for which cruises are famous."