Verse 21 - If we are wise, we will keep God's laws and commandments from the heart. This is possible only as we rely on the power of the Holy Spirit and stay in close relationship with Jesus. Keeping God's words before our eyes (by studying the Bible) is one way in which we maintain a close relationship with Him. We keep sound wisdom and learn discretion by obeying His Word.
Verse 22 - Obeying God's Word brings life to our souls. The soul of man is made up of his mind, emotions, and will. Man is a spirit who has a soul and lives in a body. The body is only the house that holds the real man. The real person is the "spirit man." The Greek word for spirit is "pneuma," which also means "breath." The spirit man, unseen with the natural eye, is the true, inward man. It is made to rule over the realms of soul and body. It is the sphere of divine influence, referred to in Scripture as the heart of man. "But let it be the hidden man of the heart, in that which is not corruptible, even the ornament of a meek and quiet spirit, which is in the sight of God a great price" (1 Peter 3:4).
Verse 23 - The Lord promises us His grace to overcome in this life in addition to many other blessings. Among these are the blessings of safety and His grace to keep us from falling.
Verse 24 - The gift of sweet sleep is a wonderful blessing. Sleep for many people is not the peaceful state God intended it to be, but a restless one. Many are unable to rest at night because they fill their minds with unwholesome things through books, movies, and so forth during the day. Others are worried and anxious; life's cares keep them awake. Some experience tormenting dreams and nightmares. Many must even use prescription drugs in order to sleep. Although prescriptions may be a temporary help, we can have God's sweet sleep without them, if we ask Him to deliver us from the root problem which causes sleeplessness. "My son, forget not my law; but let thine heart keep my commandments" (Proverbs 3:1). God promises us sweet sleep. "I will both lay me down in peace, and sleep: for thou, LORD, only makest me dwell in safety" (Psalm 4:8). "The sleep of a labouring man is sweet, whether he eat little or much: but the abundance of the rich will not suffer him to sleep" (Ecclesiastes 5:12). "It is vain for you to rise up early, to sit up late, to eat the bread of sorrows: for so he giveth his beloved sleep" (Psalm 127:2).