Then when he says, during supper, he describes the act by which Christ gave his example. First, he mentions the time of the action; secondly, the dignity of the one acting (v 3); thirdly, his humility (v 4). He describes the time in two ways: in one way, as the time of Christ's love; in another way, by emphasizing the sin of Judas.
In regard to the first, he says, literally, "when supper was done." Here we should note that both things that are permanent and things that are successive are said to be done or made. A permanent thing is said to be done or made when it has come to the perfection o...f its proper species and form; thus a house is said to be done or made when it has proper form. But in something which is successive, it is said to be made or done when it is over or is finished; thus the world is said to have been made when it was completed. But even things like this can be said to be made or done when they receive their appropriate species. So when he says here, literally, "when supper was done," he does not mean it was finished and over with: for after Christ washed the feet of the disciples, he returned to his place and gave the morsel to Judas. "When supper was done" rather means that it was prepared and now brought to his own species: for the group had already begun to eat, and then Christ got up. Thus Christ washed the feet of the disciples during supper.
We read about such a supper in Luke (14:16), "A man once gave a great supper." A breakfast and supper are different. What is given at the beginning of the day is called a breakfast, while what is given at its end is called supper. Likewise, that spiritual nourishment suitable for those beginning is called breakfast, while that nourishment appropriate for the advanced is more like a supper.
Then when the Evangelist says, when the devil had already put it into the heart of Judas Iscariot, Simon's son, to betray him, he depicts the time by emphasizing the sin of the traitor. He mentions his sin for two reasons. First, the better to bring out the evil of Judas, who in spite of so many tokens of love and humble service, considered committing such a great sin: the Psalm (41:9) says: "Even my bosom friend in whom I trusted, who ate of my bread, has lifted his heel against me." And secondly, the better to show the wonderful love of Christ who, although knowing this, treated him with love and humility by washing his feet: "With those who hated peace I was peaceable" (Ps 120:7).
But can the devil put anything into our hearts? It seems he can, for a Psalm speaks of things "sent by evil angels" (Ps 77:49). To explain this, we should note that what is in a person's thought and will is said to be in his heart. So the statement, when the devil had already put it into the heart of Judas, should be understood to refer to his will.
Understanding it the above way, there are two ways something can be put into our heart. First, directly; and in this way only one who has the power to move our will from within can put something into our heart. Only God can do this; consequently, he alone can directly move our will: "The king's heart is a stream of water in the hand," in the power, "of the Lord; he turns it wherever he will" (Prv 21:10). But because the will is also moved by an external object, something apprehended as a good, it follows that anyone who brings to mind, or suggests that something is good is said to put something into our heart indirectly, by making us apprehend something as good, which in turn moves our will. This happens in two ways. By an external suggestion, and then one person can put something into another's heart; or by an interior suggestion, which is the way the devil puts something into our heart. For our imagination, since it is a physical reality, is subject to the power of the devil when God allows it. So, whether we be awake or asleep, he forms in it certain images which, when apprehended, move our will to desire something. And so the devil puts something into our heart, not directly by moving our heart, but indirectly, by suggestion.
Source: Commentary on John