Jackson Chandler, 17, and Bradley Nelson, 16, were found by a driver not connected to the search party, Clackamas County Sheriff's Deputy Nate Thompson said. They did not need medical attention.
Television cameras captured the boys' emotional reunion with relatives after rescuers escorted them to the trailhead.
Chandler and Nelson told reporters they went in the wrong direction and got lost. The Boy Scouts and avid hikers did not have food, but they drank water and slept under trees that blocked the rain.
"I was definitely concerned. I didn't want to be spending the night out there," Chandler said. "Said a prayer and asked our heavenly father for direction on which way we needed to go."
The pair left West Linn in suburban Portland on Saturday afternoon and planned to return to their vehicle by nightfall. The deputy said the boys were found several miles from their pickup.
Their parents called for help when the boys didn't come back. On Sunday, a searcher discovered the teens' pickup five miles east of the Table Rock Wilderness area.
About 50 volunteers, joined by a helicopter, searched the foothills south of Portland on Monday.
"Thank you to everyone who put all the effort in to find us," Nelson said. "It's good to be home."
The Table Rock wilderness attracts many hikers, but Thompson said he had never heard of people getting lost in the Lost Creek Meadow area where Chandler's car was found. He said the area is at an elevation of about 4,000 feet and forested.