We can strengthen ourselves by renewing our mind, led by the Holy Spirit in order to know and understand God's will and destiny for our lives. When we focus on Him, and what he has done for us in our lives, we can move from strength to strength no matter our circumstances.
Strengthening is a habit David had grown a relationship with God since childhood. He did everything to honor God with his being. His prayer life was his place of coming to rest in someone bigger than himself. It wasn't an escape; it was more an embracing of the true reality of God.