The union representing Montgomery County's police officers voted last night to endorse the reelection write-in campaign of County Executive Sidney Kramer, saying they worry that Democratic nominee Neal Potter is too much influenced by the county prosecutor.

Potter, who picked up support yesterday from the county's major environmental groups, won the Democratic nomination despite the fact that Kramer received virtually all the major endorsements in the primary.

While the number of Potter's general election endorsements has grown, Kramer's write-in campaign is seen as helped by anything giving it momentum. Last week he was endorsed by county firefighters.

Police union leader Walter Bader said last night: "Everyone really likes Mr. Potter, but the concern is" State's Attorney Andrew L. Sonner. "We don't think Sonner has the best interests of the Montgomery police force at heart."

Sonner has been a strong backer of Potter and encouraged his successful challenge of Kramer in last month's Democratic primary, and ties between Sonner's office and Potter's campaign have prompted some critics to wonder about the extent of Sonner's influence. Potter has said that Sonner offers him advice on criminal justice matters, but that no one controls him.

Sonner acknowledged last night that there have been tensions between his office and Bader, president of the Fraternal Order of Police Lodge 35, but he said they stem from decisions to prosecute police officers accused of wrongdoing.

Potter has been endorsed by the county teachers, the school support staff and county employees. His endorsements yesterday included those from the Sierra Club, Clean Water Action and the Montgomery County League of Environmental Voters.

Republican candidate Albert Ceccone has received no endorsements to date.

Potter and Kramer each have scheduled news conferences this week to announce groups of Republicans supporting their candidacies in the Nov. 6 election.

The police union, which represents 850 officers, did not endorse any county executive candidate in this year's primary, and in 1986, the group endorsed Kramer's opponent in the Democratic primary. About 75 officers attended last night's closed-door meeting at the union's Gaithersburg clubhouse.