One distinctive feature of Molinism is the idea of Middle Knowledge, whereby God knows what any possible creature would freely do under any possible set of circumstances. Hence, the content of this knowledge is said to include all true Counterfactuals of Creaturely Freedom (CCF).
An interesting question arises when we ask ourselves “Does God also have Middle Knowledge of His own free actions, i.e. Counterfactuals of Divine Freedom?”
As Molinists understand divine omniscience, God’s knowledge is said to have a logical structure divided in three logical moments: Natural Knowledge, Middle Knowledge and Free Knowledge.
By way of summary, here is how Molinists distinguish those categories:
- Natural Knowledge: God’s prevolitional knowledge of all necessary truths, including all possibilities (i.e. all possible worlds)
- Middle Knowledge: God’s prevolitional knowledge of all counterfactual truths of what would happen under any possible set of circumstances, including counterfactuals of creaturely freedom and of random events like quantum indeterminacy (i.e. all feasible worlds)
Divine Decree: God’s free decision to actualize a world
- Free Knowledge: God’s postvolitional knowledge of all contingent truths about the world He has chosen to actualize, including its past, present and future (i.e. the actual world)
Before answering the question at hand, it is important to keep in mind that Natural Knowledge and Middle Knowledge are logically prior to the divine decree, while Free Knowledge is posterior to the divine decree (See Does God Know & Not Know Simultaneously?, and Logical Moments & the Structure of God’s Knowledge).
William Lane Craig describes the notion of logical priority in the following way:
“To say that something is logically prior to something else is not to say that the one occurs before the other in time. Temporally, they could be simultaneous. Rather, logical priority means that something serves to explain something else. The one provides the grounds or basis for the other. For example, the premises in an argument are logically prior to the conclusion, since the conclusion is derived from and based on the premises, even though temporally the premises and conclusion are all simultaneously true.” 
It should also be emphasized that there is not a single moment in time where God does not know something. Although there is a logical succession in God’s omniscience, there is no temporal progression (See A Choice Apart from Time). God eternally possesses all of His knowledge and never learns anything new. It is just that some truths are logically and explanatory prior to others.
John Laing gives a good example to understand the distinction:
“Logical priority is used to mean that while a dependency relationship exists between items in the content of God’s knowledge, there was never a time when God lacked some knowledge. While God’s knowledge of “one” and mathematical concepts is logically prior to his knowledge of “one plus one equals two,” there was never a time when God did not know “one plus one equals two.” Logical priority and logical dependency should not be confused with temporal priority, even though, in human knowledge, they go together because of our ignorance and finitude (e.g., I had to first learn the concepts of “one” and “two” and addition before I could know that one plus one equals two).” 
So, back to the initial question, stated another way: “Does God knows what He Himself would have done in any possible set of circumstances? If so, where is this knowledge located?”
Someone might suggest that God knows this via His Middle Knowledge, alongside with the other counterfactual truths. But this suggestion seems mistaken and a little reflection shows why this won’t work.
Middle Knowledge is not merely God’s knowledge of any true counterfactual. Rather, it is God’s knowledge of all true counterfactuals of creaturely freedom (i.e. not divine freedom). Plus, and most importantly, middle knowledge is logically prior to the divine decree. This means that it is independent of God’s will.
“If God is both omnipotent and omniscient (eternally without beginning) . . . God has the power to create free creatures and knows how they would freely choose if He creates them.”
Here is how William Lane Craig explains it:
“Since the content of divine middle knowledge thus depends on what the creatures themselves would do; God cannot control what He knows by His middle knowledge.”
And Kirk MacGregor clarifies:
“The content of middle knowledge does not lie within the scope of God’s will or omnipotence, God cannot control what he knows via middle knowledge, any more than he can control what he knows via natural knowledge.”
We can now understand why it is wrongheaded to place counterfactual of divine freedom in God’s Middle Knowledge. If God were to have Middle Knowledge of His own free actions, it would mean that they would be independent of His decree. In other words, for God to have Middle Knowledge of His free actions would mean that the truth-value of His free decisions to act would be established prior to His own deciding of what He Himself would do, which is absurd. Who would be deciding God’s free actions then, if their truth-value would be decided before His own decree?
As Craig succinctly expresses it:
“The point is that whoever the knower is, he cannot have knowledge of counterfactuals of freedom about his own choices logically prior to his own choices. That’s why you could have middle knowledge only of the free decisions of others. No one could have middle knowledge of his own free decisions but only those of others. […] What is impossible is having middle knowledge of one’s own free choices.”
Therefore, God cannot have Middle Knowledge of His own free actions.
But surely God knows what He would have done under other circumstances. So where should we locate the counterfactuals of divine freedom?
The answer is found in His Free Knowledge.
In the divine decree, God, by an act of absolutely complete and unlimited deliberation, made on the basis of both the purely natural knowledge and [middle knowledge], not only decides which world among the range of feasible worlds will be actual, but He also decides what He would have done in any other possible set of circumstances.
Molina expressed it this way:
“Through His free knowledge, which follows upon the act of His will, He knows in that free determination of His will what He would have willed in any circumstances and under any hypothesis that could have obtained and did not obtain.”
In other words, God’s knowledge of what He would do under any circumstances is determined by the decree of His will and is thus part of His free knowledge.
Bottom line: God’s eternal omniscience can be structured into three succeeding logically moments: Natural Knowledge, Middle Knowledge and Free Knowledge.
God does have counterfactual knowledge of His own free actions, but this knowledge is not located in His Middle Knowledge, because, being logically prior to the divine decree, the content of Middle Knowledge would not be under God’s control.
Rather, God’s knowledge of all counterfactuals of divine freedom is located in His Free Knowledge.
In the divine decree, God simultaneously decides what world will be actual and also decides what He Himself would have done under any other possible set of possible circumstances.
So, following His decree, God knows via His Free Knowledge every contingent truth about the actual world and every Counterfactual of Divine Freedom.
William Lane Craig (1999), The Only Wise God (Wipf and Stock Publishers), p.127
 John D. Laing (2018), Middle Knowledge: Human Freedom in Divine Sovereignty (Kregel Academic), p.40
 Tim Stratton (2019), An Unjustified Punt to Mystery, https://freethinkingministries.com/an-unjustified-punt-to-mystery/
 William Lane Craig (1988), The Problem of Divine Foreknowledge and Future Contingents from Aristotle to Suarez (Brill) p.176
 Kirk MacGregor (2015), Luis de Molina: The Life and Theology of the Founder of Middle Knowledge (Zondervan Academic), p.93
 William Lane Craig (2011), Q&A #223 Two Questions on Molinism, www.reasonablefaith.org/writings/question-answer/two-questions-on-molinism
 Luis de Molina, On Divine Foreknowledge (Part IV of the Concordia), translated by Alfred J. Freddoso (Cornell University Press, 1988) 220.127.116.11.13 (p.173)
 Luis de Molina, On Divine Foreknowledge (Part IV of the Concordia), translated by Alfred J. Freddoso (Cornell University Press, 1988) 18.104.22.168.13 (p.174)
 William Lane Craig (1990), Divine Foreknowledge and Human Freedom (Brill), p.277