IT'S NOT OFTEN you need a program to tell who the players are in a courtroom. But that is the situation now developing in a lawsuit that could determine the future of the Bob Marshall Wilderness area in Montana. The case has Secretary of the Interior James Watt, the Department of Justice, the House Interior Committee, the Mountain States Legal Foundation, the Pacific Legal Foundation, The Wilderness Society and some other groups almost hopelessly entangled.

It all began last spring after Secretary Watt declared his intention to open wilderness areas to mineral exploration. One of his prime candidates was the Bob Marshall and two nearby areas that contain 1.5 million acres with the potential for oil and gas production.

In an effort to slow down the secretary, the House Interior committee dug out a rarely used section of the 1976 federal land management act. It requires the secretary of the interior to withdraw from mineral leasing any land on which he or one of two congressional committees decides an "emergency" exists. After the committee voted, 23-18, that such an emergency does exist in the Bob Marshall area, Secretary Watt withdrew the land as he was required to do. Then it got complicated.

The two legal foundations, one of which Mr. Watt headed before he came to Washington, promptly filed suit against him. They claim the 1976 law is unconstitutional. If they are right, the committee can't force Mr. Watt to withdraw the land, and he will be free--at least in theory--to do what he wanted to do originally.

That had all the earmarks of a "friendly" lawsuit in which both sides--the foundations and Mr. Watt --want the same result. The head of the Pacific Legal Foundation made it look more so by suggesting the Department of Justice figure out how to lose the case. Justice Department lawyers got upset at that suggestion, but about the same time Attorney General William French Smith told the House of Representatives that his department will not defend the law under which the committee acted. While that left Mr. Watt, as the defendant, without his usual lawyer, he said he wasn't surprised. The Interior Department's lawyers, he said, also think the law is unconstitutional.

As best we can tell, these moves put all the principals in the case on the same side. That means the House of Representatives will have to hire its own lawyers to defend its committee's actions and the 1976 law. Meanwhile, the Wilderness Society and some other environmental groups have leaped into fight by any legal means possible any mineral explorations in those wilderness areas.

With the possible exception of the man who wrote the letter suggesting the government throw the case, nobody seems to have done anything wrong in this mess. The 1976 law stretches the idea behind the legislative veto to its ultimate reading, and someone ought to be challenging it. It's not surprising that executive branch lawyers don't want to defend that law, because it cuts into the powers of the agencies for which they work and it may be unconstitutional.

The only good thing that can come out of all this is the possibility that Mr. Watt may have gotten the message that not everyone is as eager as he to open up wilderness areas to exploration. If the House committee can't stop him this way, it will undoubtedly try something else. Meanwhile, the judge has his work cut out for him: sorting out the lawyers to make sure there even are two sides to the case.