It is no secret that Sens. Charles E. Grassley (R-Iowa) and Mark Andrews (R-N.D.) are farmers in private life and it is no secret that both have been hypercritical of the Reagan administration's handling of farm policy.

But both senators are in a snit-fit of major proportions because of what they say is a back-door effort by the Agriculture Department to embarrass them over federal farm program benefits they have received.

"Big Brother-Gestapo tactics," Andrews fumed yesterday. "It doesn't add much to their luster . . . . Out where I come from, you look a man in the eye and ask him what you want to know. You don't do this."

Grassley was more restrained, but still angry after learning that USDA bureaucrats in Iowa, who tipped him off, had been asked by Washington to calculate how much Grassley had received in farm program subsidies.

"If the department's motivation was to intimidate the senator, then whoever does their psychologic- al analysis ought to be fired . . . . " said an aide. "You don't ap- proach Chuck Grassley in this manner."

USDA's position yesterday was that a member of Congress whom officials refused to identify had asked the department to name the senators who had received program benefits during the past three years. The department said it came up with three names, but would not disclose those either.

Grassley and Andrews apparently were on the list. Grassley told the Senate that he had received $368 for soil conservation work several years ago on the farm that his son now operates. Andrews said that his farm, also run by a son, received between $18,000 and $20,000 in benefits last year.

A third possibility could have been Sen. Richard G. Lugar (R-Ind.), who owns a one-eighth interest in a family farm in Indiana that received payment-in-kind (PIK) benefits in 1983. Lugar's office was unable yesterday to place a value on the PIK payment.

An aide to Agriculture Secretary John R. Block insisted that the department simply was responding to a congressional request when it compiled the information. But, he added, part of the point was to demonstrate that some legislators who are helping to write this year's farm bill could stand to benefit from their lawmaking.

Andrews, for one, wasn't buying that. "I can't think of any senator who would be that small-minded to go behind the backs of his colleagues and ask for that kind of information," he said. Added Grassley's aide: "If this is politically motivated, then it backfires with Sen. Grassley. He is like a bulldog. He reversed his vote on the debt ceiling after the administration made another threat. It backfires."

Grassley's disclosure came as the Senate prepared for votes on crucial farm-bill amendments. Among the administration proposals is one that would reduce income-support subsidies on the ground that many of them go to farmers who are not in economic distress.

The department's protestations of innocence notwithstanding, the flap over payment information is not the first the USDA has touched off this year. Earlier, lobbying to scale down the dairy support program, the department took the unusual step of distributing lists of dairy support payments by congressional district, naming each legislator whose farmers received the largesse.

In another effort, the USDA circulated lists -- again naming members' names -- of districts that received the largest payments in the grain, cotton and rice support programs.

Neither approach made much of an impact. The House voted against the Reagan administration on dairy supports and the Senate Agriculture Committee has rejected the White House position on the grain and cotton subsidies.

Andrews, finally, was ready to brush aside the USDA gambit. "It's the silly season," he said. "As they say in farm country, it's small potatoes and there aren't many in the hill."