"Since prayer is an aspect of our sanctification, our development or growth in godliness, it too must be understood as the fruit of what Christ has done for us. This is often the missing dimension in books and sermons on prayer...Problems emerge when the task of praying is urged without the motive and pattern of the unique saving role of Jesus. It then becomes a legalistic burden that cannot promote godliness...
"If my assessment has been accurate, it follows that many of our problems with prayer stem from a failure to understand the relationship of our praying to the ministry of Jesus, including his praying. A wrong perspective on prayer may well come from thinking of it as playing a part in establishing our acceptance with God. Prayer that is not the grateful response of the justified sinner is likely to degenerate into an attempt to gain acceptance. Then again, if the sole motive to pray is, as I have heard it put in sermons, 'Jesus got up early to pray, so how much more do we need to get up early to pray', it is missing the grace of God in the gospel. 'He did it, therefore we ought to' is not the perspective of the gospel unless it is linked with, 'He did it for us because we are unable to do it as we ought.'
"It comes down to the avoidance of legalism. Legalism is the name we give to the attempt to achieve righteousness, a right standing with God, by our own efforts in fulfilling the requirements of God. At root we understand that legalism is wrong, but we easily succumb to it without appreciating what is going on. The only answer to this is to keep reminding ourselves of what God has done for us as the central focus of the Bible."
-----
from Prayer and the Knowledge of God by Graeme Goldsworthy