In Psalm 127 we see that we work best with God, in between the dual extremes of trying to work without God or expecting God to do all the work for us. Working with God, too, it turns out, doesn’t always involve what we expect. Sometimes God’s idea of cooperation is a little different than ours, like how verse 2 of this Psalm says God gives us sleep.
Furthermore, this “divine cooperation” applies beyond our jobs into every area of life – family, leisure, hobbies, and so on. In an age when a man’s social life is particularly disconnected, it can be difficult to feel balanced, healthy, and well-connected with all the things we have going on. The natural solution may be to see all the different parts of our lives as spokes on a wheel, with ourselves as the center axle. But what Psalm 127 is suggesting is that instead we need God with us in the center of this metaphorical wheel. Otherwise the burdens of life fall solely upon ourselves, which is precisely what the Psalm describes as working “in vain.”