CHEYENNE, Wyo. -- A 13-year-old boy who got separated from his Boy Scout group during a hiking trip in Wyoming survived partly on bugs and tree bark for the nearly 37 hours he was alone, officials said Monday. Searchers found the boy, Garrett Hunter, in good health Sunday night after happening to camp near him for the night and calling out his name, according to Sublette County sheriff's Sgt. Travis Bingham.

Garrett, of Draper, Utah, told reporters after a helicopter ferried him to an airport that he worried about whether he would see his family again. When he was found, he said his first thoughts were "Hallelujah! I'm home free."

Garrett had disappeared on Saturday morning as the Boy Scout group of about 20 boys and adults were on the way out from a weeklong, 50-mile hike in the mountains. He said he went into the trees to use the restroom, and that everyone was gone when he returned, CBS Salt Lake City affiliate KUTV reported.

Get Breaking News Delivered to Your Inbox

"Waited around a little while shouting and then I realized I was lost," Garrett said. "I was panicking and when I finally got a hold of myself, I decided to find someplace to go."

Garrett Hunter of Draper, Utah, talks to reporters Monday, July 30, 2018 in Wyoming. Sgt. Travis Bingham/Sublette County Sheriff's Office via AP

Rescuers said Garrett did exactly what he was supposed to do: stayed put.

"I wouldn't be going everywhere because I knew people were looking for me and I knew it would be easier for them to find me if I just stayed in one place," Garrett said, according to KUTV.

Garrett had a sleeping bag, a water filtration device, a little food and part of a tent. Not sure how long he might be lost, he ate ants and bark to conserve what little food he had.

The bugs were "OK," he said.

"I don't know what they taste like but they weren't bad, actually," he added.

Garrett said he used bug spray and a lighter to start a fire. He also slept on a ledge to be safe from animals.

"He had trouble starting a fire with the fire starters staying lit," Bingham said after interviewing Garrett Monday. "He improvised, using bug spray with his lighter even though his mom told him not to and did get a fire that one night."

Searchers, aided by dogs and a helicopter, scoured the rugged terrain Saturday afternoon and Sunday. The search was suspended about 7 p.m. Sunday, but one group of volunteers decided to camp near a lake that night.

When one of the volunteers yelled out Garrett's name, they heard a reply: "Help," Bingham said.

The boy was found at about 10:15 p.m. on a ledge overlooking the lake where he had stopped to wait for rescuers, Bingham said. Authorities said he did everything right to survive.

Garrett was brought out of the mountainous Bridger Wilderness on Monday morning.