SUPPOSE, IF YOU CAN, that an American diplomat abroad were entering a room for crucial negotiations with the head of a foreign state, say, Fidel Castro. Suppose that the American envoy found with Mr. castro, advising him right there on Cuban soil, an American congressman. Would it not be a curious scene, suggestive of impropriety? And wouldn't other congressmen be eager to know just what purpose (and even what master) their fellow legislator was serving?

Well, last week the American ambassador to Nicaragua entered a room in Managua to negotiate with President Anastosio Somoza - to urge him to resign, in fact. He found with Mr. Somoza, advising him right there on Nicaraguan soil, an American congressman, Rep. John M. Murphy (D-N.Y.), chairman of the House Merchant Marine and Fisheries Committee and a stalwart friend and admirer of the Nicaraguan leader. Didn't this at least suggest impropriety? And aren't the congressman's colleagues sure to want to know what he was up to in Managua?

Offering his own explanation, Chairman Murphy observed tartly Thursday that during the Vietnam war some congressmen had gone to Hanoi. How odd that a conservative, patriotic fellow like Jack Murphy would imagine that he comes off well from such an analogy. Another congressman, Rep. George Hansen (R-Idaho), volunteered that Mr. Murphy was doing nothing more than Sen. Robert Byrd (D-W. Va.) did during his trip to Moscow to discuss SALT ratification. Mr. Hansen seems to have missed that Sen. Byrd was speaking for the Senate to the Russians. He was not sitting at a negotiating table opposite the United States appearing to represent the other side.

Members of Congress have several useful roles to perform in their travels: educating themselves, communicating with foreign leaders and - if they are of a mind - broadening the delegations representing their own country. For a legislator to take up a part as a free-lance negotiator, or, as Mr. Murphy put it, "observer," lending his presence and prestige and advice to the foreign party involved in a delicate adversary proceeding with his own government, is very odd. The line of correct behavior may be a bit wavy in these circumstances, but there is little question that Mr. Murphy crossed it.