The Supreme Court yesterday upheld the legality of a technique devised by the Republican National Senatorial Campaign Committee to get around the fact that it can't legally spend money on its own for Senate campaigns.

The court ruled unanimously that such committees can spend on behalf of state parties that allow them to act as their surrogates. This enables a well-endowed national campaign committee to rescue an underfinanced Senate campaign.

In 1980, the Republican senatorial committee gave $2.7 million to various Senate races after it got a favorable ruling by the Federal Election Commission. This surrogate arrangement, known as an "agency agreement" between the national senatorial campaign committee and the state parties, was challenged by the Democrats and was ruled illegal by the Court of Appeals for the District of Columbia.

The opinion reversing the appeals court was written by Justice Byron R. White. He said the appeals court should have deferred to the FEC's conclusion, which he said was correct in stating that nothing in the law prevented agency agreements.

The technique is one of the many creations of campaign finance lawyers to maximize their clients' agility in dealing with the federal election laws enacted to put a lid on fund raising and expenditures.

Under the law, each state party committee can spend a certain amount on individual Senate campaigns (the sum varies according to population), but these committees frequently can't raise as much as they could spend.

The national senatorial campaign committee, on the other hand, could often raise as much money as it wanted but under the law could not spend it.

Under agency agreements, the state parties delegated their spending authority to the national committee. Acting as "agent" for a state party, the committee could then pump funds up to the limit into important but underfunded campaigns.

In another ruling yesterday, called "uniquely unjust" by dissenters, the court said that federal law's supremacy over state law requires it to strip the children of a deceased serviceman of their father's insurance benefits.

In a 5-to-3 decision (Justice Sandra D. O'Connor did not participate), the court overturned a Maine Supreme Court decision and ruled that the second wife of Army Sgt. Richard Ridgeway of Maine was entitled to the money because that was the way he wanted it.

Ridgeway, along with 3 million other members of the military, was insured by a policy governed by the Servicemen's Group Life Insurance Act of 1965 which says the holder may designate whomever he pleases as beneficiary.

In December, 1977, Ridgeway won a divorce from his first wife after he agreed that she and the children would get the $20,000 insurance proceeds when he died. However, when he remarried four months later he designated his new wife as the beneficiary.

Maine's highest court returned control of the money to the first wife and the children. While federal law is supreme under the Constitution, it does not require a state to permit "evasion" of a property settlement agreement, the state court ruled.

Justice Harry Blackmun, acknowledging that the case was "unpalatable," wrote the opinion reversing the Maine court.