My somewhat superficial impression is that he knew quite well that he was only talking for himself, and no God.
I refer you to the circumstances around how 66:1-2 was revealed.
The alleged prophet Mohammed was at his wife Hafsa's and she caught him having sexual relations with the
beautiful coptic slave Maria. Hafsa was angry with him, and Mohammed swoar an oath that he would not touch her again.
However, Hafsa soon found him having sex with her again in which the alleged prophet of Islam had two new revelations.
Sahih International
O Prophet, why do you prohibit [yourself from] what Allah has made lawful for you, seeking the approval of your wives? And Allah is Forgiving and Merciful.
Pickthall
O Prophet! Why bannest thou that which Allah hath made lawful for thee, seeking to please thy wives? And Allah is Forgiving, Merciful.
Yusuf Ali
O Prophet! Why holdest thou to be forbidden that which Allah has made lawful to thee? Thou seekest to please thy consorts. But Allah is Oft-Forgiving, Most Merciful.
Sahih International
Allah has already ordained for you [Muslims] the dissolution of your oaths. And Allah is your protector, and He is the Knowing, the Wise.
Pickthall
Allah hath made lawful for you (Muslims) absolution from your oaths (of such a kind), and Allah is your Protector. He is the Knower, the Wise.
Yusuf Ali
Allah has already ordained for you, (O men), the dissolution of your oaths (in some cases): and Allah is your Protector, and He is Full of Knowledge and Wisdom.
No one can be quite that self deceiving. I think this illustrates pretty well he was cynically using Allah to achieve his own wants and wishes.