A citizen passing by Kennedy Middle School in Cupertino at about 7:30 a.m. recognized James "Jim" Norberg, 63, as a man reported missing, sheriff's spokesman Deputy Kurtis Stenderup said.
The person, walking near the school grounds before students had arrived, saw Norberg behind the fence by the track of the school at 821 Bubb Road near where Norberg lived, Stenderup said.
Emergency responders took Norberg to a local hospital at about 8 a.m. but he was not injured or hurt, Stenderup said.
"He'd been exposed to the elements all night long," Stenderup said. "I don't know if he's at the hospital or at home. He's safe."
Norberg, who suffers from dementia, had left his home in Cupertino without word while wearing a blue shirt, blue jeans and brown slippers.
"He has trouble communicating, he has trouble eating on his own," Stenderup said. "He's not in good health."
Search and rescue teams and a sheriff's office helicopter were deployed Thursday in the effort to locate Norberg, Stenderup said.