If you think sheep are dumb, you are mistaken, but many people make the same mistake. After 20+ years of raising sheep, I had to smarten up a lot before I could appreciate how sheep think. Being at the bottom the food chain, they learned long ago that there is safety in numbers, they must be wary of everything that is different or new and to never go into a darkened area because you never know what's in there. Unlike the old adage, for a sheep, what you don't know CAN hurt you. Any individuals who wasn't wary enough or intelligent enough was eaten long before it was able to reproduce.
There was a recent study in Scotland that revealed that sheep are now considered the smartest species of domestic livestock, even smarter than hogs. They can see color, recognize shapes and quickly learn to associate certain shapes, colors or actions with food. They found that sheep would problem solve in order to get to some eats. I do know that the average sheep will quickly find any weakness in your fencing system. And I know for a fact that sheep have better memories than any other livestock. If you open up a gate this fall that leads into a tasty hay field (or they get through the fence), I know from experience that if you put the sheep into the same area a full year later, they will immediately go to that same gate or hole in the fence like it was yesterday.
That said, if your sheep wandered away to a new area, you can be assured it will be able to find it's way back. Now if it was chased there by a predator, that may be a different story. And if it got out of a trailer far from home, I don't believe it will will have an innate sense of which way is home like some cats and dogs do. Ewes will sometimes wander away from or distance themselves from the rest of the flock to lamb, with hair sheep being more apt to do so than wool breeds.