Two Soviet Cosmonauts returned to earth today after five days in space aboard an orbiting laboratory with two colleagues, whom they left behind. It was the world's first successful roundtrip visit to a manned earth orbiting space station, and signalled an advance for the frequently troubled Soviet program to send human beings beyond the atmosphere.

The cosmonauts returned to earth in Soyuz 26, which the original crew used to reach the Salyut 6 laboratory 37 days ago. The returned crew left their newer spacecraft linked to the space station, where they had docked last Wednesday using a docking port that had first undergone a "spacewalk" inspection to insure it worked.

Col. Vladimir Janibekov and flight engineer Oleg Makarov soft-landed without mishap in Kazakstan in Soviet Central Asia and are feeling well, according to Tass, the official Soviet news agency. Later, national television broadcast a brief welcoming reception for the two and showed a brief glimpse of their spacecraft moving slowly away from the orbiting Salyut.

The returning crew brought with them research results and experiments that have been carried out aboard the 19-ton space station since it was first launched more than three months ago.

Still orbiting were Lt. col. Yuri Romanenko and Flight Engineer Georgi Grechko, who have now spent more than a month in space, almost all of it apparently uneventful. The Soviet record for space endurance is 63 days; the U.S. record is 84.

Soviet attempts to break the U.S. record have been cut short by the apparent adverse psychological effects of long-term isolation and weightlessness. But the Soviet space program has delved deep into these questions in recent years and the five -day visit of the second crew was clearly arranged with the psychological issue in mind. The four cosmonauts were shown laughing and joking during several television transmissions, as if to dispel any fears of depression or emotional fatigue of the long-term crew.

With their smaller rockets and payload, the Soviet manned space program has been forced to concentrate on the idea of building large orbiting labs from smaller components. Tass alluded to this, calling the double-docking and successful return "a most important step along the road of creating permanently operating manned orbital stations with relievable crews.

The United States, which has successfully conducted manned roundtrip ferry flights between an orbiting mothership and the surface of the moon --than roundtrip earth orbit flights --has not yet orbited its new, huge space shuttle. The reusable shuttle, now being flight-tested, can carry thousands of pounds of supplies into space and remain there for more than a month if necessary.

There have been brief, preliminary talks between the United States and the Soviet Union over a mission to dock the space shuttle with a Salyut or Soyuz. This would duplicate the 1975 docking of an Apollo craft with a Soyuz, an event widely hailed here even now as clear proof of the two nations' technical equality and desire to cooperate peacefully in space.