A nationwide attack on epilepsy - the last medical condition "to come out of the closet," in experts' opinion - was urged on President Carter by a national commission yesterday.

A nine-member body created by Congress two years ago said that by spending $100 million or so a year the government could start many new federal, state and local programs to help the two million "neglected" Americans who have epileptic seizures.

For this "bargain" sum, said Dr, Richard Masland, the commission's executive director, the nation could seek out and treat at least 600,000 untreated epileptics. Doing this would "prevent at least one million seizures a year," he said, and enable thousands more epileptics to work, saving the country "some $900 million a year" in custodial and medical costs and costs of lost production.

Also, the commission said, the nation could take many steps "at no cost at all and at enormous savings" to prevent head injuries, thus preventing much irreparable brain damage and consequent epilepsy.

Among these steps, the commission advocated making all motor-cyclists wear helmets, making motorists use restraints like seat and shoulder belts, enforcing 55-mile-an-hour speed limits and fighting drunken driving.

"There are two important things the country has to do about epilepsy," said Masland, a former official of the National Institutes of Health.

"One is to start programs in research, treatment, prevention, job training and other areas. The person with epilepsy falls through the cracks now because we have no single, national, comprehensive approach.

"Second, we need to educate everyone that epilepsy is a natural process. There has been a tendency to keep it hidden. Many epileptics still hesitate to come forward out of embarrassment or fear of losing their jobs.

"Certainly there is fright and terror in seeing someone suffer a seizure. But a seizure is a very temporary thing, and it's easy to help the person who has one. Just put a pillow under the head and turn the head to prevent choking.

"We're in a new era for the handicapped, and this era should include this group."

Epilepsy should really be called "the epilepsies," explained Dr. Paul Crandall of Los Angeles, one commission member. The term includes a number of conditions caused by some brain damage of abnormal function, he said, with symptoms that range from seizures, or unconsciousness, to fleeting lapses of attention, much like those that sometimes affect everyone.

Despite the size of the epilepsy problem, said the commission, the only federal effort concerned solely with epilepsy is a medical investigation unit at NIH.

To correct this, the commission urged a "national plan for action" that would cost the federal government $73.7 million in its first year and reach a level of $101.8 million by the third year. Spending such sums, Masland said, would inspire many non-federal programs and "pull together" many existing programs to direct them against epilepsy with little or no additional cost.

Among more than 400 recommendations, the commission urged:

Establishment of a "comprehensive epilepsy service network" to get treatment, job training and social services to patients.

Establishment of 10 surgical centers to eliminate areas of abnormal brain function in some epileptics.

Quick Food and Drug Administration approval of sodium valproate, an anti-seizure drug being widely used in Europe but held up here by FDA safety tests. "This drug could help many epileptics not aided by present drugs," mainly barbiturates and Dilantin, Masland said. "We appreciate the need for safety testing, but few serious side effects have shown up in Europe and the need of many epileptics is urgent."

"Vigorous" federal effort to vaccinate children against all the childhood diseases that can damage the brain, and to develop a vaccine against bacterial meningitis (or brain inflammation), which causes much epilepsy.

Masland called the "action plan" a balanced approach that attacks the disease and "prepares society," since "all too often it is not epilepsy but society's reaction which creates the disability."