In his commentary on Exodus 34:1-10, 27-35 (in the 3rd vol. of the Harmony of the Law), John Calvin states that Moses became an angelic being while atop Mount Sinai. Moses was able to fast for forty days because he was freed from “the infirmity of the flesh” and was separated from “communion with men.” He was “invested with angelic glory.” This is also why his face shone with light.
28. And he was there with the Lord forty days The number of forty days is repeated, in order that the second Tables might have no less credit than the first; for we have stated that Moses was withdrawn from the common life of men, that he might bring the Law, as it were, from heaven. If he had only been kept a few days in the mount, his authority would not have been ratified by so conspicuous a miracle; but the forty days obtained full credit for his mission, so that the people might know that he was sent by God; inasmuch as the endurance of a fast for so long a period exceeded the capacity of human nature. Wherefore, in order that the majesty of the Law might be indubitable, its minister was invested with angelic glory; and hence he expressly records that “he did neither eat bread, nor drink watch” since it was requisite that he should be distinguished from other mortals, in order that his official character might be unquestionable. Now, it must be borne in mind, that this was not a mere fast of temperance or sobriety, but of special privilege, whereby exemption from the infirmity of the flesh was vouchsafed to Moses for a time, in order that his condition might be different from the rest of the human race. For neither did he feel any hunger, nor did he struggle with any longing for food, nor desire meat and drink any more than one of the angels. Therefore this instance of abstinence was never alleged as an example by the Prophets, nor did any one attempt to imitate what they all knew to be by no means accorded to them. I except Elijah, who, being sent to revive the Law, when it was almost lost, like a second Moses, abstained also from eating and drinking for forty days. The reason for the fast of Christ was similar, (Matthew 4:2 ) for, in order to acquire full credit for his Gospel, He desired to make it manifest that He was by no means inferior to Moses in this particular. Wherefore, the less excusable is that error, which sprang from gross ignorance, when all, without exception, endeavored to rival the Son of God in their annual fast, as if a new promulgation of the Gospel was entrusted to them. For neither did Christ fast forty day’s more than once in His life; nor during the whole of that time, as it is clearly specified, did he experience hunger; and His heavenly Father separated Him from communion with men, when He was preparing Himself to undertake the office of teacher.