For if we examine the idea we have of the incomprehensible supreme Being, we shall find that we come by it the same way; and that the complex ideas we have both of God, and separate Spirits, are made up of the simple ideas we receive from Reflection; v.g., having from what we experiment in our selves, got the ideas of existence and duration; of knowledge and power; of pleasure and happiness; and of several other qualities and powers which it is better to have, than to be without; when we would frame an idea the most suitable we can to the Supreme Being, we enlarge every one of these with our idea of Infinity; and so putting them together, make our complex idea of God. For that the mind has such a power of enlarging some of its ideas, received from sensation, has been already shewed.
-  This passage was quoted from Alister McGrath, The Christian Theology Reader, 2nd edn. (Blackwell Publishers: 2001) p. 29
Alister McGrath also further comments on John Locke’s thought regarding the concept of God:
. . .the English empiricist philosopher John Locke argues that the notion of God is derived from experience. The human mind constructs the idea of God by extrapolating ideas already present in the world to infinity, thus leading to the idea of God as a supreme Being. The idea of God thus results from experience, rather than from pure reason. (pp. 28-29