Reversing the pattern of recent years, the U.S. Navy is getting an increasing number of modern warships while much of the Soviet navy is becoming obsolete.

The change was disclosed at a Senate Armed Services Committee hearing yesterday by Adm. James L. Holloway III, chief of naval operations. Asked whether the Soviets in "the next five to 10 years will decline and we will go up" in warships, Holloway answered, "Yes."

Navy leaders in past years have issued grim warnings about the Soviet fleet building up while the American one declined.

Yesterday, Holloway explained the reversal of this trend in terms of cycles.

The U.S. Navy, he said, retired many vessels at once as World War II ships wore out, sharply reducing the size of the fleet. But the Navy's recent shipbuilding program is now putting new ships into service and will continue to do so over the next decade.

Moscow, in contrast, did not have a big fleet left over from World War II and started building its new one after the war. Those ships now face "block obsolescence," the term for a lot of ships getting old at once.

Sen. Thomas J. McIntyre (D-N.H.). who as chairman of the Research and Development Subcommittee has questioned whether Pentagon leaders have overstated the Soviet threat and understated U.S. capabilities, asked Holloway questions about the relative strengths of the U.S. and Soviet navies.

Besides agreeing that the U.S. fleet was on the upswing, Holloway agreed that the newest U.S. warships are better than their Soviet counterparts.

The primary threats to the U.S. Navy's "major responsibilities," such as keeping the sea line to North Atlantic Treaty Organization countries open, Hollaway said, are not the Soviets' new surface ships but their submarines and Backfire bombers.

The admiral noted that every other Backfire coming off the Soviet production line is used for patrolling the oceans. The bombers, he said, are armed with supersonic antiship missiles.

Several senators urged Navy leaders to submit promptly their new five-year shipbuilding plan to Congress. The Pentagon has promised to deliver the plan next month. Chairman John C. Stennis (D-Miss.) said the Navy would be in "a lot of trouble" if a start on its long-range shipbuilding program is not made in fiscal 1979.

Sen. Barry Goldwater (R-Ariz.) said that "for 20 years now the Navy has been getting the short end of the stick" as far as getting the ships it needs. The navy today is in "the worst shape it has ever been," he added.

"If you get your game together," McIntyre told Navy leaders, "we'll give you everything you need to keep superiority on our side."

Other topics covered during the open Senate hearing included:

Aircraft carriers -- Holloway said he still favors building a fourth Nimitz-class nuclear-powered aircraft carrier rather than switch to the nonnuclear, medium-sized carrier Navy Secretary W. Graham Clayton prefers. A new Navy study showed that three CVV designated nonnuclear carriers displacing about 60,000 tons each could be brought for the price of two Nimitz nuclear giants.

The comparative construction costs, according to the Navy, are $2,398 billion for another Nimitz and $1.455 billion for the medium carrier. Holloway said he felt the extra capability of a Nimitz carrier was worth the cost difference.

Marine aircraft -- Marine Commandant Louis H. Wilson said he would prefer to risk a "fighter gap" in the 1980s by not buying new F-18 fighters if that would provide money to speed the Corps switch to advanced V/STOL (vertical and short take-off and landing) fighter-bombers.

In a related development, President Carter has endorsed building two small underground communications nets in Michigan and Wisconsin to communicate with submarines. The project, formerly called Sanguine and now Seafarer, is hotly opposed by environmental groups in those states.