The boy, Adam Zepeda, went missing from Treeview Elementary School after getting into trouble at school earlier in the day, police said. When his mother went to pick him up from the campus, he could not be found.
Sometime after school, Adam met up with some of his classmates and played basketball with them until about 8:15 p.m. outside their home on Rivercrest Lane, about two miles from his home near the South Hayward BART station, Lt. Chris Orrey said.
He disappeared again afterward and the search for him continued overnight.
Shortly after 7:30 a.m. today, a teacher from Treeview Elementary spotted Adam walking in the neighborhood where he had played basketball, Orrey said.
His grandparents, who were out looking for him, spotted him at about the same time.
He was wearing a T-shirt and shorts but didn't appear to be cold, Orrey said. "He wasn't shivering, he seemed in good spirits," she said.
It still wasn't clear this morning whether Adam had wandered around all night, Orrey said. "We're still talking to him now so we're not entirely sure," she said.
She said it appears Adam avoided going home after school because he didn't want to face the consequences of the minor trouble he had gotten into on Tuesday.