If we want to know whence came the spiritual impulses within Cornelius to, v2, "fear God," "give alms generously," and "pray to God always," it will require the anthropology and soteriology--the doctrines of man and salvation--which is taught by the rest of Scripture.
It is a false inference, a faulty anthropology, to begin this chapter by assuming that Cornelius had made initiative toward God, to which God reacted. Instead, we rightly begin by recognizing that God reacts (so to speak) to his own prior work in Cornelius and his household.
The angel in the vision engages Cornelius at the level of his human experience--not by teaching him about the long trail of Providence that had finally brought him to live as a "godfearer' beside his Jewish neighbors--but simply by stating, v4 & v31, that his "prayers and alms" had been received by God.
At the level of Cornelius' experience, God answers his devotion by giving him instruction to summon a particular minister (Peter) for further guidance. At the level of eternal purpose, God is fulfilling his own decree of election that encompasses all the means foreordained to bring the gospel of Cornelius' salvation to him at the appointed time.
v22 contains the judgment of men (which is again at the level of human perception) concerning the reputation of Cornelius. In their experience, a devout Jew (which they presume Peter to be) would seldom risk ceremonial defilement by going into the uncleanness of a Gentile dwelling (cf. v28, also Jn.18:28). They make their request for Peter's presence using the best human and divine inducements they know.
So, do vv34-35--which begins a record (epitome) of Peter's message that day--mean to teach that here and there in the world, there are people who prepare themselves somehow for God to act? V35 considered simply as a statement, connected with v34, doesn't actually say a single thing about prior conditions at all, but is an observation that God is not only the Propitiator of Jews (marked by devotion), but the Propitiator of every nation.
How does it come about that anyone, of any nation, fears God and works righteousness, in any degree? Peter doesn't refer to divine causation, but not mentioning it doesn't mean he doesn't believe it is so, and that it is necessary.
People have a tendency to read-between-the-lines, especially when handling narrative texts. There is actually warrant for that, to some extent; because we ought to be reading narrative text bearing in mind the beliefs of the narrative participants, as well as that of the narrator. Narrative tells a story, and in the telling not every fact can be related--selection is necessary. But there is a whole network of beliefs that undergird the presentation.
The big problem in reading-between-the-lines is when it is done not with a biblical-theology informing "the gaps," but with personal experience taking that role. If the reader assumes at the outset that Peter's belief is (even before he opens his mouth in v34): Cornelius is already "accepted by God" to some degree on account of his works; then the reader will read the words of v35 a certain way.
But is that assumption in keeping with a biblically complete and accurate anthropology and soteriology? I don't think so. There is a better way to read the text as given, with a better set of assumptions behind the reading filling in the gaps.
The fuzzy nature of interpolation is a major reason why we do not typically ground doctrine in narrative texts. It's true: Peter is engaged here in didactic presentation. But that only underscores the importance of sticking precisely to the propositions he makes (and limiting our assumptions as to what may be implied); and most importantly to observe that the precise teaching purpose of the full speech comes out in vv36-43, not in the introductory and slightly biographical expressions of vv34-35.
The purpose of vv34-35 is to declare the opening of the divine call of grace to the Gentiles. It's purpose is not to teach preparationist doctrine, or that the purpose of evangelism is to go and find the god-fearers and do-gooders of the world, in order to get the gospel to the people who have prepared themselves. Yes, it's possible to read the text that way, but not consistently with the rest of Scripture.
Who are the godfearing and righteous people in God's sight (not in their own sight, or other men's sight)? They are believers in Christ. Any man who hearing the gospel rejects it, though he have a wonderful reputation with men, he is not godfearing and righteous in the sight of God. Apart from the grace of God, men are dead in trespasses and sins, and cannot please God. No man's prayer to God is due an answer, apart from the prior promise of God. All genuine seeking of God is prompted by divine initiative.
Such is Peter's biblical theology, in the light of which everything he says should be understood.