NEWARK — Over the past few years, Sen. Richard Codey has made a habit of appearing unannounced at boarding homes, ticking off health code violations in his gravel-toned voice as he checks patients for bed sores in front of public officials and reporters.

But when Codey shambled down University Avenue Monday night, hiding his face behind a pasted-on gray beard and make-up that turned his skin into a mess of dirt and burst-blood vessels, he did something unorthodox, even by his standards.

The man who once ran the Garden State ducked into a Newark homeless shelter at 9 p.m. He didn’t come out until sunrise. Codey woke up Tuesday in a room with 20 other men inside the Goodwill Mission, marking the end of a four-month probe into city homeless shelters.

Codey says the research and his undercover stay in Newark on Tuesday reveal a broken system that makes it impossible for homeless men to find shelter if they suffer from a mental illness or lack government aid.

"The indictment here is of a system that says if you’re male, or have an illness that’s mental, they don’t want you," he said. "And if you’re not on a public entitlement program, there’s no bed at the inn."

Starting in November of 2011, Codey said he called more than 20 facilities in Essex County, but was often rebuffed by employees who either refused to take in "crazy people" or said he needed a source of federal income to gain entry.

"It’s impossible," he said.

Codey was finally able to gain access to Goodwill Monday, after a make-up artist sketched tattoos on his neck and left hand, glued a beard to his chin and painted tobacco stains on his teeth, making Codey look like anything but the man who sat in the Governor’s office from 2004 to 2006.

Codey’s stay at the mission was "better than expected," but he still derided the facility for its lack of beds and an employee’s decree that Codey would have to sign up for welfare if he remained at the University Avenue complex more than one night.

Officials at the mission denied Codey’s allegations, saying while many Newark facilities refuse access to those who suffer from mental illness of lack federal benefits, Goodwill has an open-door policy.

"We don’t accept any funding from welfare or anybody else. I can’t imagine who would have told him that," said Carmella Hutson, the mission’s emergency services director. "We help the folks with no ID, we help the folks with mental illness ... we are the peace when they can go nowhere else."

The problems go beyond Newark. Homeless people without welfare, and those who are mentally ill, have an extremely difficult time finding shelter in the state, said Robert Davison, executive director of the Essex County Mental Health Association.

Davison pointed to a study by the Corporation on Supportive Housing, which showed there were 3,462 homeless people suffering from mental illness in New Jersey last year, representing nearly 90 percent of the state’s documented homeless population.

Goodwill’s executive director, Ron Schober, applauded Codey’s efforts, but said his facility and many others are struggling to find funding for simple things like beds. With the down economy, the demand for aid is growing while resources continue to shrink.

"People are out of work. People are struggling with foreclosures," he said. "You don’t need to be a rocket scientist to kind of see that’s what’s happening."

Codey — a longtime advocate for the disadvantaged and a potential opponent for Gov. Chris Christie next year — dismissed the notion that his stay in Newark was an attempt to score political points.

"We’re looking to shine a light on people who, in this economy, are forgotten about," he said.

Related coverage:

• N.J. Sen. Codey goes undercover to research Newark homeless shelter



• N.J. Sen. Codey calls on state to explain how it spent $168M from special needs housing fund