The nuclear aircraft carrier that launched the abortive Iranian rescue mission returned to its home port of Norfolk today after President Carter told its crew that they had helped preserve the lives of the American hostages in Tehran.

In glorious spring weather, the crew of the Nimitz gathered on the deck of the giant carrier 30 miles off shore to be welcomed home by the president after a peacetime record of 144 continuous days at sea, much of it on patrol in the Indian Ocean off the coast of Iran.

"I am absolutely convinced that your presence there, along with other United States ships and the fighting men on them, has been the major factor in protecting the lives of the 53 hostages, that are still being held," Carter told the cheering sailors.

The president, who flew to the deck of the Nimitz by helicopter from Camp David, also brought with him a morale-boosting announcement of his support for a series of measures to increase benefits provided to military personnel.

Most of the package, which would include higher sea duty and flight pay, an increase in food allowances and higher housing allowances in high-cost areas, is included in legislation sponsored by Sens. Sam Nunn (D-ga.) and John Warner R-Va.). Carter said the administration will support this measure and also will introduce legislation to increase temporary duty reimbursements and to improve dental programs available to those in service.

Pentagon officials said the proposals would cost $85 million this year and up to $700 million in the fiscal year that begin Oct. 1.

The announcement was greeted by cheers on the Nimitz, but the main preoccupation of the crews was clearly their impending homecoming after almost nine months away.

The Nimitz left Norfolk last Sept. 10 for what was to have been a routine tour with the Sixth Fleet in the Mediterranean. But in early January, two months into the Iranian crisis, the carrier and its escorts, the nuclear missile cruisers California and Texas were dispatched to the Indian Ocean as part of the buildup of U.S. forces.

The eight helicopters that took part in the hostage rescue attempt were launched from the Nimitz last month during what Navy officials said was its record tour at sea without entering a port.

The carrier's Memorial Day homecoming in a cool breeze and under sunny skies provided a perfect back-ground for a presidential visit.

Accompanied by his wife, Rosalynn, Defense Secretary Harold Brown and other Pentagon and Navy officials, the president landed on the deck of the Nimitz at midafternoon and was greeted on deck by much of the crew.

"Our nation is grateful to you for what you have meant to our country, to freedom and to the peace that has been maintained for the entire world by your courage and your dedication and your service to the U.S. Navy," Carter told the men.

He told them their mission in the Indian Ocean also went beyond the immediate crisis involving the hostages.

"Your presence in the Indian Ocean and the Arabian Sea," he said, "served project the presence of the United States government and its military forces at a time when [that] presence was crucial to the maintenance of peace and stability in that troubled region of the world that is vital to all nations on earth."

The president contrasted the Nimitz's mission with the Soviet invasion of Afghanistan, where he said Soviet troops are "at war with Moslem schoolgirls."

"Our nation stands for freedom," he said. "Our nation stands for human rights. Our nation stands for peace. But there is no way for us to stand for these vital elements of the lives of human beings who love liberty without a strong military force."

Carter was greeted enthusiastically by the crew of the Nimitz, and for several minutes he moved among the men, reaching to shake their hands. In random interviews, most of the men expressed pride that the rescue attempt had been mounted, disappointment that it has failed and over-whelming relief to be but a few miles from their home port.

The crew of the Nimitz was never officially told in advance of its role in the rescue attempt, according to Thomas Boughey, a data processing specialist from Toledo, Ohio, who said he most looked forward to the coming reunion with his wife and three children.

But, Boughey added, when special crews and maintenance personnel were flown to the Nimitz a week before the mission and the ship's gray helicopters were painted brown, most of the crew knew that something was up and that it probably involved the hostages in Tehran.

When it was over, Boughey said, "all we were told was that we had a part in the mission and that it had failed." Morale on the ship plunged, he said, but he added that criticism of the helicopter maintenance is misdirected if it is aimed at the Nimitz crew.

"That is totally unfair," Boughey said. "The last week before they went up, our people never touched the helicopters."

Boughey said the Navy did its best to relieve the tedium at sea. Every two weeks or so, the crew of the Nimitz had a picnic on the deck, complete with steaks, hot dogs and soft drinks.

"At times it's very lonely," he said. "You try to keep your mind off the loneliness by trying to find a hobby."

From the Nimitz, the president flew to Norfolk, where he briefly spoke to thousands of people who awaited the arrival of the carrier and its two escorts.

Many of the men on the Nimitz said they thought today's homecoming could have occurred several days earlier, but that the ship had slowed, presumably to allow Carter his Memorial Day visit. Approaching their home port, they also did not seem to care much.

"We're glad to get home," said Jamie Morris, 20, an aviation electronics technician from Topeka, Kan. "They do a lot of things their own way."