LAST WEEK was a good week for the "sleep activist"/street guru who answers to Kernel Loose-Nut—the guy arrested this spring for the alleged crime of sleeping on a wooden pallet, and the same guy who, nine months ago, helped start the camping-ban prayer vigil outside city hall.

In a Multnomah County courtroom on Thursday, August 23, the Kernel won a key victory in what's become a legal jihad against city rules that ban homeless Portlanders from erecting things like tents and tarps and other "temporary structures" in hopes of eking out a decent night's sleep despite lousy weather.

The Kernel argued that the city's definition of an illegal "structure" is too vague to be consistently (and fairly) enforced, and Judge Stephen Bushong was sympathetic. He also cleared the Kernel, AKA Moses Wrosen, of interfering with a police officer—something that's difficult to do when you've gone limp in an act of civil disobedience.

After court, the Kernel tweeted a celebratory picture of himself in a shirt and tie—a departure from the hot pants and midriff-baring shirts he often sports in the summer. And he explained his crusade by saying he had a "moral obligation" to challenge the city.

"To prohibit sleep, by making it illegal for people to protect themselves and their belongings from the elements, is immoral and amounts to torture," the Kernel says he testified in court.

The Kernel did have a solid ally in his fight: civil rights attorney Michael Rose, fresh from successfully defending the naked Transportation Security Administration protester, John Brennan, against charges of public indecency. If Bushong was already leaning the Kernel's way, Rose's closing arguments likely helped make up his mind.

"We won acquittal on both ends of a classic civil disobedience lie-in case and a possible inroad on a troubling city policy," Rose said in a statement. "This is especially pleasing."

Ironically, the verdict came the day after Portland City Council settled a nearly four-year-old federal civil rights suit targeting the city's anti-camping laws. The city, under the terms of that settlement, was allowed to keep its ban on structures with a promise, instead, to take better care of homeless campers' things if and when campsites are cleared.

Not everyone is thrilled with that outcome. The Kernel sees an opportunity to keep fighting the city's anti-sleep laws—maybe through "a pallet-building party," he jokes. And he hopes his case might also help dozens of Occupy Portland protesters fend off their own bogus "interfering with a cop" charges.

"This doesn't change the law," the Kernel told me. "It's one judge's opinion. But it's a step."