Psalm 23:5 AMP You prepare a table before me in the presence of my enemies. You anoint my head with *oil; my [brimming] cup runs over.
The Shepherd prepares the table as the host of a banquet and invites the sheep as honored guests to come. The Lord, a God of abundant provision prepares a royal banquet! The table prepared in the presence of enemies may reflect the custom that a person could not be attacked while eating in another’s tent/house. You are safe from your enemies while eating in God’s dwelling!
It was also a custom to anoint guests at feasts. Honored guests were anointed with perfumed oil. The anointing oil when mixed with perfume refreshed and revived the guest. It was applied to the face, head and hair of the guest. For the rest of the feast that person would then smell the sweet perfume. It was a way of welcoming the honored guest to let them know that they were cared for and loved.
The cup running over speaks of abundance and drinking one’s fill at the Lord’s table. The picture of the Lord as host filling the honored guest’s cup to overflowing also has a custom behind it. When you came to a person’s house (even if a stranger) you were offered a cup of wine or water along with a meal. As long as the cup was being refilled you were welcome to stay; if the cup remained empty it was time to go. If the host enjoyed your company and decided that you could stay as long as you liked, the cup would be filled to the rim and overflow. This overflowing cup was only offered to special guests because in the desert you just don’t waste water or wine. So the Lord as host, by offering the overflowing cup is saying, stay as long as you want, I have an abundant supply of wine, oil and bread to meet your needs both now and forever.
Psalm 23:6 Surely goodness and mercy shall follow me All the days of my life; And I will dwell in the house of the LORD Forever.
Psalm 104:15 [The Lord provides] wine that makes glad the heart of man, oil to make his face shine, and bread which strengthens man’s heart.
John 16:24 TLB You haven’t tried this before, but begin now. Ask, using my name, and you will receive, and your cup of joy will overflow.
*Footnote from the amplified Bible:
It is difficult for those living in a temperate climate to appreciate, but it was customary in hot climates to anoint the body with oil to protect it from excessive perspiration. When mixed with perfume, the oil imparted a delightfully refreshing and invigorating sensation. Athletes anointed their bodies as a matter of course before running a race. As the body, therefore, anointed with oil was refreshed, invigorated, and better fitted for action, so the Lord would anoint His “sheep” with the Holy Spirit, Whom oil symbolizes, to fit them to engage more freely in His service and run in the way He directs–in heavenly fellowship with Him.