A federal judge dismissed a sex discrimination suit yesterday that had been filed against USAir by a woman copilot who claimed that she was unfairly prevented from working alongside her pilot-husband.

District Judge Albert V. Bryan Jr. of Alexandria ruled that a USAir policy that prohibits relatives from occupying the same cockpit in flight is a legitimate business necessity and does not discriminate against women.

"There is no question in my mind from this evidence and general knowledge that there ought to be one boss in that cockpit," Bryan said. "The policy was in effect prior to her employment. I don't think she can complain that they changed horses in the middle of the stream."

Kay Schuttler, a first officer (copilot) with USAir, met and married her husband, William Schuttler, after she joined the airline.

USAir allows relatives to work on the same flight but, for safety reasons, not in the cockpit together. Kay Schuttler contended that this policy amounts to a new type of discrimination, based on marriage.

Bryan ruled, however, that the policy was blind to gender and, if anything, would harm men more often than women because there are fewer women pilots.

"I'm very disappointed by this decision," said Schuttler, who had sat through a day of testimony by officials of the airline. "I think this is a bad blow to any working woman." Her attorney said they had not yet decided whether to appeal.

Schuttler was hired by USAir as a pilot in November 1980 and throughout 1981 and 1982 she flew regularly with her future husband. They married in November 1982. But by October 1983 they were divorced, mostly, she said yesterday, because of the stress arising from the airline's decison to prevent them from flying together.

Her doctor testified that she was under severe stress before the divorce and that he had to prescribe sedatives for her. She has not flown since February, but remains employed by the company.

"The only reason for my divorce was to try and stop the discrimination I have experienced because we were married," she testified. Both before the marriage and after the divorce, the Schuttlers flew together -- properly, in USAir's view -- in the same cockpit.

Schuttler has said in the past that she wanted to remarry her ex-husband, but yesterday, after the decision was announced, she said she did not know what her plans would be.

In closing arguments, Gregory Lewis, the USAir attorney, emphasized that the policy that prohibits relatives from working in the cockpit together "was not a hiring policy. In fact, it was first entered into to permit the hiring of relatives."

Airlines differ on their regulations toward allowing relatives and married couples to work together. Several carriers have rules similar to the USAir policy, according to court testimony.

Schuttler argued that she was only exercising her seniority rights by bidding on the same flights that her husband worked. The Pittsburgh-based airline has a strict seniority system with regard to scheduling.

Bryan said that since the policy was in effect before she started to work for USAir, "if she took no notice of it that was her own fault."