John Ellinwood argues that in verses 4 and 5 King David acknowledges God's protection in expeditions and in battles. "Thou preparest a table before me in the presence of mine enemies" refers to the sober raucous dinner before major battles. These were raucous in order to demoralize hostiles camped within earshot, and (only) the king ate from a table. "Thou anointest my head with oil" because tomorrow this ceremony might be impossible. After each victory there was no longer a need for sobriety, so "my cup runneth over." The king's lyricist wisely shortened these military verses for balance. Also in Psalm 18 David mentions God's protection in battle.