You are my portion, O Lord;
I have promised to obey your words.
I have sought your face with all my heart;
be gracious to me according to your promise.
I have considered my ways
and have turned my steps to your statutes.
I will hasten and not delay
to obey your commands.
Though the wicked bind me with ropes,
I will not forget your law.
At midnight I rise to give you thanks
for your righteous laws.
I am a friend to all who fear you,
to all who follow your precepts.
The earth is filled with your love, O Lord,
teach me your decrees.
The footnote in my Bible for verse 57 ("You are my portion, O Lord") says, "The portion referred to by the psalmist was not his inheritance in the land but the Lord himself (see Nu. 18:20)." In Numbers 18:20, the Lord tells Aaron (the high priest), "You [and all the priests and Levites] will have no inheritance in their land, nor will you have any share among them; I am your share and your inheritance among the Israelites."
No land? But land was everything for the Israelites. It was not only their livelihood, it was the tangible fulfillment of God's promises to his people, beginning with Abraham. Withholding land seemed like God was holding back, not giving his people the best but just the dregs. Plan B. But God tells them, "I am your share and your inheritance." And the psalmist affirms that this is good, "You are my portion, O Lord."
God is our portion, too. More than anything tangible or relational or emotional that he can give us. That is why we sing, "When I walk in the desert place, blessed be your name." John Piper once asked (roughly), "Why are you looking forward to heaven? Is it because of no more pain and suffering? Because you will be reunited with loved ones? Or is it because you will finally be face to face with Christ?" The best part of heaven is God himself.
We train our hearts for heaven by remembering that the best part of life here on earth is God himself, too. Not what he gives us, not how he makes us feel, but God himself. He is our portion, and that is more than enough. Our cups overflow.
And that is why we obey, that is why we love God's perfect revelation of himself to us in his law. That is why we say, "At midnight I rise to give you thanks for your righteous laws." That is why we consider our ways and hasten to align our lives with God's precepts. That is why we seek God's face with all our hearts, why we find our primary companionship with people who also find their fulness in God alone. We are rebellious, control-freaks to our twisted core who have to train ourselves to love what is good and best. We obey not because that gives us leverage over God or because we are slavishly afraid of him or the consequences of disobedience. We delight in doing what is good because this puts us in the path of seeing (believing, experiencing) what is true: that not inheriting the land is not getting jilted; we've gotten the true treasure that land (or financial abundance or physical health or a great body or a spouse or kids) just hinted at in the first place.
Post-script: As I read Psalm 119 slowly, I find this becoming true. I not only tell myself that God's law is what is good and best, but I find myself loving it and wanting to love it more because of how it guides me to Christ. The law can have a firm hand, but it is also a gentle guide, like a bit in the mouth of a well-trained horse. If there is rain and shadow in half of my yard and pleasant sunshine in the other half, I want be where the sun is shining. "You are my portion, O Lord." "Be thou my vision, O Lord of my heart. Naught be all else to me save that thou art." No wonder this is such a great wedding song; in a relationship where we are so prone to idolatry, we are asking God to constantly keep before our eyes where our true portion lies.