THE SENATE succumbed to a bout of spy hysteria last month and enacted a requirement for convicted spies to forfeit profits from telling or selling their stories. Senators thought they were acting for a high purpose in preventing the likes of John A. Walker Jr. from making money from his despicable acts. They drew on the precedent of federal and state ''Son of Sam'' laws that compel violent criminals to forfeit any profits if they go the kill-and-tell route of a notorious New York murderer. But they did a very mischievous thing.

Amendment No. 2184 is based in part on chief sponsor Ted Stevens' wildly implausible notion that it might actually help deter spying -- by letting would-be spies know that if caught and convicted they could not make money by telling about it. Think about what makes someone a spy and see whether you can recall one who phoned his agent and then drove off to make a dead drop.

Then consider the limitless range of figures, starting perhaps with Socrates and continuing on through Jawaharlal Nehru, whose reflections make plain that in a prison cell the human imagination can bloom. Nehru commended prison ''not only to aspiring writers but to aspiring politicians, too.'' It is not simply that we who publish for profit hesitate to cut out others who would do the same. Why would a reasonable person wish to establish a precedent, or harden the Son of Sam precedent, imposing this particular sanction on the perpetrators of whatever crime is most agitating the public at any given moment? The public's access to a full range of reading choice can only be diminished by this act.

But the potential reach of this measure goes beyond felons without rights. The measure would apparently require anyone convicted of espionage to forfeit proceeds derived from his crime. It could also apply to convictions under the communications intelligence statute, which CIA Director William Casey has recently brandished at assorted news organizations, including this one. Do we have a special interest here? You bet we do. This proposal could require a judge to order a convicted newspaper to forfeit ''all property'' used in commission of the crime.

Spying is ugly. Spies deserve stern punishment. But judges already have available plenty of penalties. There is no good reason to write a new one whose chief victims, intended or not, might not be spies. There is good reason not to.