IT IS VERY WELL to argue, as some State Department human-rights advocates evidently did, that President Carter risked undercutting the cause by writing a personal letter to Nicaraguan President Anastasio Somoza last month patting him on the back for certain human-rights improvements. Steering another country's social and political change is tricky, and there's room to debate tactical details.

We note with dismay, however, that word of the letter leaked. The purpose of the leak could not have been to influence the letter, already sent, but apparently just to embarrass the president. A newspaper can hardly bite the hand that feeds it. The leak suggests, nonetheless, this administration's inability, in dealing with its own people, to summon up the loyalty or to enforce the discipline that would let it govern with reasonable efficiency. A president should be able to send a personal letter without worrying that those he consults in preparing it will blab.

But we have a further complaint, on the substance of American policy. The letter and the leak are premised on a view of Nicaragua that may be fundamentally wrong: that what the United States is dealing with in Nicaragua is a human-rights problem. That is the framework in which American policy toward that small and dependent country has come to be taken as symbolic of whether the administration is "serious" about human rights.

But what the United States is really dealing with in Nicaragua, or so we increasingly suspect, is a revolution. It is comforting to think that the aging dictator Somoza will somehow fade away and be replaced in the scheduled 1981 elections by moderat democrats friendly to the United States. Such is the polarization and violence now building, however, that President Somoza may be forced out in an explosion well before 1981 and replaced not by centrist democrats but by elements politically and ideologically beholden to the guerrillas of the Sandinista National Liberation Front. A "second Cuba" in Central America? It is not out of the question.

For Mr. Carter to write Gen. Somoza as though the question were how to manage a process of gradual and peaceable change seems besides the point. He would do better to figure that the imminence of a major upheaval requires an urgent diplomatic initiative, one meant to help bring representative popular government to Nicaragua before that possibility is preempted by escalating violence. An argument over American policy toward Nicaragua is essential, but it ought to be on the right question.