Ezra 1:1
This says clearly that God was able to stir the spirit of Cyrus. There is no indication that Cyrus was aware that God was stirring him up. He just somehow was motivated to issue this proclamation. He may have thought the idea really came from him or from one of his advisors. But for some reason, all of a sudden, he had an inclination to give the Jews the opportunity to go back to their own homeland.
This verse also suggests that our spirit can be communicated with without our being aware of it happening. Understand, however, that we will not always be blind to this or insensitive to it. It is God's intention that we become very sensitive to the fact that something or someone is trying to communicate with us on a level that is not discernable by the eye or the ear. Nonetheless, our spirit can be stirred to go in a certain direction for good or for bad. We need to begin to realize that we may or may not be aware that our spirit is being communicated with.

God is superintending events on this earth. When He wants something done through a man, He interfaces with him, perhaps inserting thoughts into the person's mind without awareness. This occurred when the LORD stirred up the spirit of Cyrus king of Persia, motivating him to issue the proclamation. Cyrus was not aware God was stirring him. He may have thought the idea came from himself or an advisor. Somehow Cyrus concluded it was in the national interest of Medo-Persia to relocate a small portion of the Jews and give them opportunity to restore the Temple, as he did for other conquered peoples. God inspired it without removing Cyrus' free moral agency.