NEW YORK (AP) _ The communist countries of eastern Europe will benefit this summer, travel experts predict, as American tourists seek safe places to visit following the U.S. bombing raid on Libya and a spate of European terrorist attacks.

Advance bookings to Mediterranean countries are down, while reservations to the Soviet Union and eastern Europe are strong, travel agents say.

''Russia is considered to be very safe,'' said Suzanne DeCellis, a travel agent in Indianapolis.

Americans are also turning to South America and the Orient, the Caribbean and Canada. But the vast majority will be vacationing at home, and tourist sites in the United States are expecting a boom.

This month, the United States bombed Moammar Khadafy's strongholds in Libya, and Americans have been targets in terrorist attacks in West Berlin and elsewhere. Summer travel to some traditional destinations in Europe will suffer. The signs are everywhere:

- Americans who travel to Italy and want a taste of home will get a stark reminder of their vulnerability. At the McDonald's restaurant in Rome, a pair of armed military police stand guard.

- Pan American Airways had planned to begin new service between Chicago and Frankfurt and between Los Angeles and Paris on April 26, but the plans were canceled because bookings were light. Instead, the airline is adding flights between New York and California.

Bookings on Pan Am flights to Rome, Athens and Tel Aviv were weak, while bookings to eastern Europe and to Scandinavia were strong, said spokesman Merle Richman. Flights on Pan Am and Aeroflot, the huge Soviet airline, begin Monday between the United States and Moscow or Leningrad, and bookings are reported heavy. Advance reservations to South America were up 50 percent over last year, Richman added.

- Cancellations of school trips to foreign lands are widespread, said Colleen Zarich, deputy executive director of the Council on International Educational Exchange. ''We're all frightened that it could be changing the nature of American travel in the global sense, which we think is unfortunate,'' she said.

- An American gymnastics delegation canceled a trip to Algeria, the United States Tennis Association will not be sending junior players to the Italian Open, and the DePauw University football team and the North Carolina women's basketball team canceled their tours of Europe.

When the American men's national basketball team participates in the world championships in Spain, their uniforms will be redesigned to make the ''U.S.A.'' less conspicuous.

''When I was growing up, I was taught that being from America was the best thing in the world,'' said Anastasia Kostoff-Mann, a Los Angeles travel agent and president of the Travel Research Association. ''Now people are calling me and asking, 'How do I get a phony foreign passport?'''

A 20 percent to 30 percent decline in American travel to Europe is the rough estimate of the North American Committee of the European Travel Commission, which represents 23 European national tourist offices.

The U.S. Travel Data Center, a private research group, figures about 35 percent of foreign travelers have changed their plans.

And the American Automobile Association, the nation's largest travel agency, said its bookings to Europe plummeted 75 percent in the first quarter of 1986. Reservations boomed for domestic travel and flights to nations that are perceived as safer.

Still, even with the downturn, millions of Americans are expected in Europe this summer.

There were 6.4 million American visitors last year, said Donald McSullivan, chairman of the tourism committee.

''Knock 20 percent off that, and you still have the better part of 5 million Americans coming to Europe,'' he said.

Many who intend to go simply do not believe the risk is great, said Kostoff-Mann.

''When you come to the statistical considerations, the odds are still quite small,'' she said. ''A lot of people are saying, 'What a great time to go to Europe, when nobody will be there.'''

Travelers may face long delays, extensive searches and higher fares as airlines and governments bolster security, said Robert H. Kupperman, director of the Center for Strategic and International Studies, a think tank.

Students and others traveling alone, rather than in organized groups, are still expected to migrate to Europe this summer, travel agents said.

''It adds a little bit of spice to their lives,'' said George McKenzie, a Cambridge, Mass., travel agent who handles a lot of college students.

Business travelers are also expected to go.

''You can't stop living just because there are some terrorists around,'' said Robert Kleist, an Irvine, Calif., businessman who frequently travels to Europe and the Orient.

But others disagree. ''Nobody in their right mind is going over there and we wouldn't send them,'' said Ruth Marvin, a Savannah, Ga., travel agent who recommends her customers avoid southern Europe and the Middle East.

Americans who do go to Europe this summer will probably try to keep a low profile, said Howard Fine, president and chief executive officer of Costa Cruises.

''I don't think that anyone planning to go to Europe is going to get into a political argument or stand on a soapbox on Speaker's Corner in Hyde Park in London,'' he said.