By early August the Yellow Legs and the Sanderlings have left their northern breeding grounds and are migrating south, towards home which is often as far as South America.
Both species are fairly common along the coast during migration, Yellow Legs in marshes mostly, and Sanderlings on sandy shores. Lots of both on Cape Cod and the Islands.