LOS ANGELES (AP) _ Draft resister David Wayte admits he's glad a judge didn't send him to prison, but says the ''house arrest'' sentence with a ban on public service work for six months is ''a substantial penalty.''

U.S. District Judge Terry Hatter said Tuesday he spent a sleepless night devising the plan, under which Wayte, 24, must spend six months confined to his grandmother's home instead of the 10 years in prison and $10,000 fine he faced after pleading guilty June 13 to a count of failing to register for the draft.

''I'm relieved that I'm not going to prison, although I'm facing a substantial penalty,'' Wayte said. ''It's been a lot of emotional drain, waiting and anticipating. It's a big relief to have it over.''

Hatter, who had recieved 1,000 letters from Wayte's friends and family, said Tuesday the unusual sentence keeps Wayte out of prison but punishes him by the ban on public service. Wayte, a former Yale University philosophy student who fought his case to the U.S. Supreme Court, works at a school for disabled adults and at a shelter and soup kitchen for the homeless in Pasadena.

''Society loses, in a sense, but it gains in that it has a person punished for violating laws,'' Hatter said. Society would lose even more if Wayte, a socially conscious activist, were sent to prison, he said.

Hatter said was particularly moved by a letter from Wayte's father. Both grandmothers also wrote, said American Civil Liberties Union spokeswoman Sheila Balkan.

Ms. Balkan refused to quote from the letter written by Helen Wayte, who will be her grandson's jailer, but said, ''It was her sincere desire to keep her grandson out of prison... It is a really sweet letter, the kind of things grandmothers write.''

Wayte's attorney, Mark Rosenbaum of the ACLU, said, ''It's a creative sentence ... that metes out punishment.''

Assistant U.S. Attorney Richard Romero, who said he won't appeal the sentence although he had recommended jail time to deter others from refusing to register for the draft, said the grandmother will not receive federal payments for housing Wayte.

Wayte contended he was prosecuted only because of such protests as writing anti-draft letters to then-President Jimmy Carter.

In July 1982, Wayte was indicted on one count of failing to register. But in November 1982, Hatter ruled that the government had violated his right to free speech by prosecuting only vocal draft resisters.

A federal appeals court overturned Hatter's ruling in July 1983, and in March the U.S. Supreme Court upheld that decision.

Wayte then pleaded guilty to the charge.

The slender Wayte appeared in a tan corduroy suit, with his blond hair cut short - minus the ponytail that had once been a trademark.

''I know that I've broken the law, and according to the law I am subject to punishment,'' Wayte told Hatter. ''This is a matter of deep conscience to me, and I never meant any disrespect to anyone by it.''

The draft registration law enacted in 1980 requires young men to sign up with the Selective Service, although the draft itself is not in effect.