To feed, these birds wade in shallow water and pick up aquatic insects, etc. for food. They don't swim while feeding.
And if I could add from my own observations at Herdsman Lake, these birds seem to enjoy standing still in the sun. Perhaps they were meditating, standing on one leg!
But they are quite shy and always fly away before I can get close enough for a good shot!
Birds in Backyards - Black-winged stilt