Like the mentally retarded who have been hidden behind the silent walls of state and private institutions, it is a subject shrouded in embarrassed conversation and hushed tones.

But sex is an issue of growing concern in light of the current trend toward "normalization" -- a drive to empty the nation's institutions by training many of the mentally retarded to live in group homes and work in the community.

And Massachusetts, which built the first fortress in the country 131 years ago to isolate the mentally retarded, is leading the federally mandated drive to help the nation's 6 1/2 million mentally retarded persons deal with their own sexuality so that they can return to society.

"They mystery of sex is hard enough for normal adolescents to cope with," said Margaret Fleming, who teaches sex education to retarded people at the Wrentham State School here. "For these people -- and they are very innocent and naive -- it is an even more difficult drive to have to contend with."

"We've been not dealing with it for so long that is it is our obligation," said Francis Kelley, superintendent of the state institution here. "But many of the other states are just ignoring the issue."

"The issue" has kept telephones ringing at the Massachusetts Department of Mental Health in recent weeks. Whispers turned into screaming headlines announcing state plans for "sex rooms' for the retarded.

Under new Medicaid guidelines issued by the U.S. Department of Health, Education and Welfare in 1976, state institutions are required to provide privacy as well as sex education for residents.

But someone, explained one state worker, put "one and one together and came up with three" -- a proposal to provide private rooms in state institutions where mentally retarded persons could engage in sexual intercourse.

The idea is a part a 10-page draft of a state policy, the first of its kind nationwide, to provide retarded patients with "appropriate and necessary assistance in sexual development."

The resulting surge of oppostition from parents, clergy and others has been aimed at a section of the draft that reads: "All clients are entitled to an area of physical availabilty of privacy." It says staff must have a good reason to invade that privacy and "appropriate consensual sexual activity is not sufficient reason to interfere."

"If a client is competent, if he is consenting, educated, trained in the issues and aware of what he's doing, then he should be allowed to express his own sexuality in an appropriate place," said Susan Dube, a spokesman for the Mental Health Department's division of mental retardation.

However, she noted, "this is a very sensitive issue and that is why we must tread ever so lightly."

Some news accounts marched indelicately over the issue. After reading the reports, one parents' group spokesman, Benjamin Ricci, commented, "I don't think we should be encouraging them to go off in rooms with a sex partner."

Neither did the state's human services secretary nor the mental health commissioner Robert Okim, who fired off a press release calling the so-called "sex room" idea "totally unacceptabe."

He has refused to comment further, but nervous department spokesmen have been assuring reporters that there will be a lengthy review with plenty of public omment before such a policy is adopted.

The moral of the drama, says Kelley of the Wrentham state school, is that mis-understandings, confusion and anxiety are common reactions to efforts to release shackles.

And ironically, this sort of fearful behavior from "normal" members of society is one of the main reasons mentally retarded persons must learn appropriate sexual behavior, he said. "Dealing with their own sexuality is part of community readiness."

Adds Fleming, the school's nursing supervisor: "They need to know what is right and wrong; things as basic as who you hug and kiss. We're a very loving group here at the school but you can't do those kinds of things at McDonalds just because a guy hands you a hamburger.

"They need to know enough about sex," Fleming said, "to say 'No'."