CAIRO AND OLD DESERT TRADITION of sleeping away sun-scorched afternoons and working only during the cool mornings and evenings has ended, at least for now, in over-crowded Cairo.

Early last month, President Anwar Sadat completely upset the working and living habits of some 12 million Cairenes. He said the city can no longer afford the lingering lunches and siestas that occupied shopkeepers and government workers from 2 to 5 every afternoon.

Instead of closing for lunch and reopening their businesses in the early evenings, a practice that is centuries old, storeowners now cannot open before 10 a.m. and they must close at 6 p.m. Government offices now open at 8 a.m. rather than 10 a.m. so that everyone doesn't converge on the city at once.

ONE GOVERNMENT OFFICIAL called the new system, which took effect Nov. 8, a "tailor-made solution" for a population that has more than doubled in the last 10 years.

"It was the only way to handle the 10-12 million Cairenes who caused chaos daily with 250,000 cars, leaving the Cairo streets in a desperate state," said Sayed Zaki, chairman of the People's Assembly committee charged with monitoring the new law.

Cairo's streets were built to handle 3 million persons and only a fraction of the number of cars that daily clog intersections and park three deep on thoroughfares. Under the old system, with shop and office workers all coming and leaving Cairo at four peak rush hours a day, the buses had become unbearably crowded and traffic crawled through the city from 10 a.m. until after 10 at night.

Donkey carts, a common means of delivering foods and picking up garbage in Cairo, added to the traffic problem. Under the new law, donkeys must stay off the streets during working hours.

TO ITS CREDIT, the law has solved Cairo's night traffic jams. But during the day, it can still take 45 minutes to travel two miles through downtown. The real problem with the new hours is that they have turned the city into a ghost town after 7 p.m. Cairo residents, who love night life, now have nowhere to bide their time.

By some estimates, nearly 60 percent of business in this city had been carried on in the evening. The setting of the winter sun brought life to Cairo. Qasr el-Nil, Cairo's Fifth Avenue, was packed with window-shoppers lined shoulder to shoulder angling for a glimpse of appliances on display up and down the block. For Egyptian teen-agers, downtown Cairo was a giant mall, a place to hang out and meet friends or just waste time roaming the aisles.

Nearly everything in Cairo had been geared to the night. Most women never went to the hairdresser before 5 p.m. Weddings are celebrated after 9 p.m. Lawyers' and doctors' hours are often after sunset.

"It is natural for this climate," explained one lawyer who has his offices downtown. "We go to court in the morning, take off in the afternoon when it's too hot to work, and open the office at night when everyone is in town anyway.

"Now no one knows when to find me," he said. "I still must be in court in the morning. People still want to take their lunch in the afternoons and few people are going to make special trips into Cairo at night just to see, their lawyers."

FOR THE MOST PART, Cairenes are confused and businessmen are angry. A downtown department store estimated that business is off nearly 30 per cent.

Florists and hairdressers associations have petitioned the government to make their industries an exception to the law. Food outlets and pharmacies already are exempted from keeping restricted hours. Most people hope that so many businesses will be exempted from the hours that others can just start ignoring it.

WHEN SADAT ANNOUNCED the new schedule, most city residents predicted it would not last a week. But it has been over a month since the order was enforced and Sadat shows no signs of letting up. When the law took effect, the city was streaming with extra duty police and soldiers who not so subtly reminded shopkeepers when it was time to close. Violators are threatened with heavy fines and having their shops closed. Police report few offenders.

Government studies estimate that the new hours will cut Cairo transportation cost by $2 million annually and will save up to 15 per cent on fuel consumption that had been wasted in nighttime traffic jams. Public buses, which no longer have to contend with two sets of rush hours, are expected to suffer less breakdowns and to become 17 percent more efficient.

Television viewing is also expected to increase; many Cairenes complain that they now have nothing else to do at night.