Next (v 30), John shows that what was predicted came about. First, he mentions the action which was done; secondly, the time when it was done.
What was done was done quickly, because after receiving the morsel, he immediately went out. Note that, as Origen says, the Evangelist does not say that Judas ate the morsel, but that he received it. This can be understood in two ways. First, it could be that Judas was so troubled about obeying the Teacher that when he received the morsel, he did not eat it, but perhaps left it on the table and without delay went out to complete his betrayal. The reaso...n for this could be that the devil did not allow Judas to eat the bread. For the devil, who had already entered into the heart of Judas, feared that if Judas ate the bread, the devil would have to leave, since he could not be in the same place as Jesus: "What accord has Christ with Belial?" (2 Cor 6:15); "You cannot drink the cup of the Lord and the cup of demons" (1 Cor 10:21).
Taken the other way, we could think that Judas ate the bread he received. Then the meaning is, after receiving the morsel, not only in his hand, but even eating it, he immediately went out. He thus made use of a good thing in a bad way. This is exactly what someone does who unworthily eats the bread of the Lord, or drinks from his chalice: he eats and drinks to his own damage and adds to his sin. So the bread Jesus gave to Judas became a source of harm: for after the bread entered into him so did Satan.
The time is described as one of darkness: and it was night. He mentions this for two reasons. First, to emphasize the malice of Judas. It had grown in his heart to such a degree that even the inconvenience of the hour did not cause him to wait till the morning: "The murderer rises in the dark...and in the night he is as a thief" (Job 24:14).
In the second place, he wants to show his state of mind. It was night, because the mind of Judas the traitor was dark, without divine light. "If any one walks in the day, he does not stumble, because he sees the light of this world. But if any one walks in the night, he stumbles, because the light is not in him" (11:9-10).
Source: Commentary on John