The last verse states two actions of a believer in Jesus, indicating that the entire psalm resulted in their enacting. The first is meditation of the heart. The second action is speaking or singing what he had meditated. Of course, David or someone else wrote down his meditations.
Meditations are contemplations of the mind and heart on a particular subject that do not quickly pass through the mind. They are thinking over at length the mysteries of life. When I first heard of meditations I considered them as something far east religions did while humming and Christian monks did while chanting. The Hebrew word for meditation here means “solemn murmuring sound” coming from a person and/or a musical instrument. The sound can help the mind concentrate. It could even be songbirds, wind, distant thunder, waves, rivers, and waterfalls.
Meditating doesn’t have to be about spiritual things such as God, Satan, salvation, damnation, heaven, hell, angels, and demons. They can be about practical matters like whether or not to go to college, marry someone, have children, buy a house, take a job, and move to another state or country. However, for a believer in Jesus meditation is often about spiritual matters even when it includes secular subjects.
This psalm reveals that David first deeply considered the silent words of the heavens. That made his mind shift to the written word of God, the law of the LORD. He contemplated and discovered that living by them had accomplished so much. He considered how the ordinances of the LORD kept him from doing things harmful and destructive. He had great admiration for how speaking to him through the written word had freed him from being ruled by his sinful nature.
Meditation is good. Meditating is allowing the Spirit of God to help me seek and understand myself, my life, my environment, and other people in light of all that God is doing in and through me, and in and through them. May the words of my mouth and the meditation of my heart be pleasing in your sight, O LORD, my Rock, and my Redeemer.