I come from a Byzantine perspective, so my comments might be a
bit different. Sorry it's so long, but I tried to write it so that the most
relevant parts come first, so you can stop reading, kind of like a news story.
Mardi Gras/Carnival things might well derive from some pre-Christian
fertility festivals and the like, but it could also have come from the simple
practice of eating up all of the non-fasting foods and getting in all the sex
you can before you have to start fasting (one Greek priest I knew once
referred to Lent as "the lentil period"). Of course, there's also the
instinctive tendency to want to up the ante and make the party bigger than it
was last year, and things could easily be more bacchanalian in contexts in
which the people involved are actually less pious to begin with, so it
provides a good excuse.
My understanding of the origins of Lent is that it was a practice in the
early Church that catechumens were asked to fast for 40 days (evoking Jesus'
40 days in the Transjordan, Moses's 40 days on the mountain, the Israelites'
40 years in the desert) to prepare for their baptisms on Great and Holy
Saturday (I think this was later extended to Advent since Theophany is another
major day for baptism of converts). At some point (presumably in the 4th or
5th century), the Church decided it would be a good idea if everyone did it
(whether it was a spirit of solidarity matter or simply the recognition that
those who were already Christian tend to get kind of sloppy and need a good
refresher).
In the Orthodox world, the specific rules of what is and isn't fasting
are subject to a lot of local variation (e.g., Carpatho-Russians allow fish
during fasts, native Alaskans don't abstain from meat because they would
probably end up starving to death--there's an incident in the journals of St.
Yakov Netsvetov on this), but I follow the Byzantine/Greek practice of nothing
from a critter with a backbone (no meat, no dairy, no eggs, no fish) as well
as abstention from wine and olive oil. People don't like to mention it, but
marital relations are also in the fasting guidelines (I noticed once that Jim
Brundage noted sex as subject to the fasting rules during Advent and Lent for
the West in his book, but he never mentioned it in class that I can recall).
There's also a tradition of not eating until after the ninth hour (3 pm),
which I actually try to observe (though not always successfully) during the
week, but not on weekends.
In the Byzantine tradition, Lent is the 40 days before Holy Week (so we
start on what's called Clean Monday with the service of Forgiveness Vespers in
the evening of the Sunday of the Expulsion from Paradise--the Orthodox
liturgical day begins at sundown, but the fasting day begins at midnight).
There is katalysis (a relaxation of the rules) for Saturdays and Sundays,
which allows for olive oil and wine on the weekends. There is a tradition of
trying to kick Lent off by being hardcore and not eating anything for the
first three days until after the Liturgy of the Presanctified Gifts on Clean
Wednesday evening. There is also katalysis for the Annunciation (allowing even
fish!). Holy Week, while technically separate (and liturgically really wild),
follows the fasting rules for Lent (Great and Holy Saturday is the only
Saturday of the year for which there is no katalysis and it's a strict
fast).
Furthermore, the Church thought it was a good idea to provide a
"pre-season" to get people ready for Lent, called Triodion. There's even a
little warning day (Zacchaeus Sunday) before Triodion actually starts. The
first week of Triodion is the week following the Sunday of the Parable of the
Publican and Pharisee; this is one of four much-anticipated fast-free weeks (a
reminder that the Pharisee's boast includes that he fasts twice a week, so a
subtle reminder of the importance of humility rather than ascetic feats), so
we can eat meat on Wednesday and Friday. Then, there's the Sunday of Parable
of the Prodigal Son (so a call to remember the mercy of God and to repent),
which is a normal week (fasting on Wednesday and Friday). This past Sunday was
the Sunday of the Last Judgment (so we get the heavy dose of liturgical
reminders of the justice of God and a call to repentance), which is also
called Meatfare (i.e., last chance to eat meat until Pascha), which ushers in
what's called Cheesefare week (we can have dairy, eggs, and fish all week
long, even on Wednesday and Friday). Then, the final Sunday is the Sunday of
the Expulsion from Paradise (a pretty heavy punch in the gut about the
consequences of sin), which is also called Cheesefare Sunday (because we have
to finish up all of our dairy because we can't have it until Pascha) and also
Forgiveness Sunday (the vespers that evening, which is the vespers for Clean
Monday to start Lent, has a big rite in which everyone in attendance asks the
forgiveness of everyone else, beginning with the priest, in order to start
Lent in a spirit of having lain aside all resentments and so on, but it also
derives from the practice of at least one Palestinian monastery where the
brotherhood scattered to the wilderness for the duration of Lent, see the Life
of St. Mary of Egypt for that).
Sorry about the length of the reply. It's an elaborate matter.