What are the reasons for fasting from midnight before Eucharist? According to traditional Catholic rules (before Vatican the 2nd Council), as well as in Eastern Orthodox traditions, those who want to receive the Sacraments should fast, i.e. do not consume any food or liquids, from midnight until receiving Holy Communion.

Presumably, this rule is based on the Canon XLI of the Council of Carthage (419): 


  That by men who are fasting sacrifices are to be offered to God.
  THAT the Sacraments of the Altar are not to be celebrated except by those who are fasting,
  except on the one anniversary of the celebration of the Lord’s Supper; for if the commemoration
  of some of the dead, whether bishops or others, is to be made in the afternoon, let it be only with
  prayers, if those who officiate have already breakfasted.


At least, it is how this tradition is explained in the Eastern Orthodox Church.

But I don't see in this canon any mentioning of midnight. Why fasting is obliged to be from midnight?
Prior to the Council decision in 417 CE, Augustine opined in letter 54 in 400 CE that "for the honour of so great a sacrament, that the body of the Lord should take the precedence of all other food entering the mouth of a Christian;".

Augustine recognized that the Lord and apostles ate the Thanksgiving [Eucharist] after eating (Mat. 26:26, etc), but believed that the apostles or successors had the authority to make changes.  This accounted for the variety of observances in churches.

But why midnight?  Augustine says, "As to the question whether upon that day it is right to partake of food before either offering or partaking of the Eucharist,"

In the Roman time frame, a day began and ended at midnight.  So, that day would start at midnight from which no food/water was taken until the sacrament.  Centuries later, Aquinas confirms this understanding.

In addition, there are references to pagans fasting until midnight and then breaking their fasts with revelry.  Christians apparently reacted against this practice not with revelry, but with beginning a fast at midnight.  Again, this would account for the variety of observance as not all the same practices were found throughout the world.

Letter 54 of St. Augustine (A.D. 400)

Summa Theologiae (Question 80): The use or receiving of this sacrament in general

A History Of The Church, from the Edict of Milan, A. D. 313, to the Council of Chalcedon See page 185.