New Year's Eve, a grim occasion of forced gaiety, involves mortification of the flesh and spirit simultaneously. It is a fit occasion for considering America's changing attitudes about alcohol.

A sunrise out of a sea of blood is the new seriousness about drunken driving. But this is just society's self-defense against gross carnage. More interesting, because they involve subtle social reasoning, are the constantly changing attitudes toward alcohol consumption generally.

Massachusetts has banned most bar and restaurant "happy hours" and other drink promotions. New Jersey's Supreme Court has held that a host can be liable for injuries inflicted by a guest who became intoxicated on the host's liquor. President Reagan recently put aside conservative reluctance to regulate from Washington and signed a bill denying federal highway subsidies to states that do not raise the drinking age to 21. There are moves afoot to regulate the frequency and substance of advertisements for alcoholic beverages and to use taxes to cut consumption.

The merits of these measures are debatable. But, taken together, there may be additional evidence of a pendular movement away from individualist libertar- ianism and toward communitarian conservatism. Attitudes toward alcohol often have changed with prevailing ideology. This is explained in "Drinking in America: A History" by Mark Lender and James Martin.

The doctrine of liberty promoted during the Revolutionary era weakened communal and individual restraints in many areas of life. By 1790 an average American over 15 drank about 6 gallons of absolute alcohol annually, and 7.1 gallons by 1810. The average today is about 2.9 gallons.

Instead of tea breaks there often were "eleveners" and 4 o'clock drams of whiskey, not to mention breakfast bracers. The practice of politicians "treating" voters to whiskey affirmed democracy -- the rulers drinking with the masses. The self-sufficient individual was the center of -- almost the full expression of -- American values in the Jacksonian era. In eclipse was the idea that communal values and individual virtue are the only solid foundations for free institutions.

But by 1850 there was a dramatic decline in alcohol consumption. Some snobbery was involved: the Irish drank to assert Irishness and Germans clung to beer-drinking habits for cultural identity, so some of the other groups decided that hard drinking was for immigrants, not "real" Americans. But there was also a revival of the "stewardship tradition." That involved the idea that a stable social order and temperate popular government depends on a general atmosphere of temperance -- in religion, culture, commerce -- and a moral elite of exemplary character to guide society.

With the rise of less severely individualist thinking, people became more willing to see alcoholism not just as a problem of the isolated drinker but of a generally intemperate social climate. The movement for Prohibition -- itself an intemperate measure -- began to grow.

By the 1850s, annual per-capita consumption of absolute alcohol fell well below three gallons. After the Civil War, industrialism, urbanization and the unsettling pluralism of the immigration era heightened anxieties about a fundamental lack of discipline in American life and of stability in the American character.

The Prohibition movement grew and acquired a "democratic" rationale: The subordination of the masses in Europe was linked to the enervating effect of excessive drinking permitted by Europe's ruling classes. (That idea has a contemporary echo. In the anti-Utopia of Orwell's "1984," the one commodity that is cheap and plentiful is gin.) Prohibition was enacted in the aftermath of the World War I emphasis on national unity and discipline.

But as Americans became more confident of their ability to contain the disintegrative forces of modern life, instruments of new experiences (telephones, automobiles, radio, movies) encouraged a reassertion of America's primary value -- individualism. Drinking, especially in defiance of the law, became a sign of healthy self-assertion.

In some ways Prohibition "worked," and even was "progressive" in that it improved the lot of the lower classes. Some wages that hitherto had been spent on drink were saved or spent on family necessi- ties, and alcohol-related illnesses and accidents declined. But the net result was not, to say the least, the desired one -- a virtuous republic. It was more "A City on a Still."

In America there will always be pendular swings, first toward severe individualism and then toward using law to restrain appetites and shape behavior for the collective public good. Certainly arguing about alcohol is one of America's oldest traditions. As William Bradford noted indignantly in his diary, he and other passeng- ers of the Mayflower "were hastened ashore and made to drink water" -- ugh! -- "that the seamen might have the more beer."