Mayor Marion Barry, stricken with chest pains over the weekend, remained hospitalized in "guarded" but improved condition yesterday, while the District government appeared to run smoothly in his absence.

"The mayor rested throughout Sunday night comfortably and he hasn't had any further chest pains," said the mayor's press secretry, Annette Samuels, who had a half-hour visit with Barry in the coronary unit of Howard University Hospital. "The doctor tells me all tests performed were normal, and he's in good spirits. He's alert."

Barry, 47, was rushed by ambulance Sunday morning from the Washington Hilton Hotel to the nearby hospital after he complained of severe chest pains and a shortness of breath.

The mayor was being kept under sedation in the coronary unit for at least 48 hours while undergoing tests for everything from a heart attack to severe digestive problems. He is expected to remain hospitalized at least until the weekend.

Several high-level aides said that the mayor may simply have been exhausted from several weeks of heavy activity, including extensive meetings, receptions and dinners last weekend during the 13th Annual Congressional Black Caucus legislative weekend at the Washington Hilton.

Last Friday, for instance, Barry's official schedule ran from 8 a.m. to 1 a.m. the following day. On Saturday, he helped kick off a celebrity tennis match at the Shoreham Hotel and that evening attended a dinner and receptions that lasted until early the next day.

"The mayor has a schedule that could kill a horse," said City Administrator Thomas Downs, who is in charge of the day-to-day operation of the city in the mayor's absence. "We're relieved that it's just physical exhaustion and not anything more serious."

Council member Nadine P. Winter (D-Ward 6) said Barry looked ill Saturday night at the Black Caucus awards dinner.

"I said to him, 'You just do not look good,' " Winter said yesterday. "He has a habit of trying to do everything. How many hands can you shake? He wasn't his usual jovial self. He didn't look good."

City officials said yesterday that Barry's hospitalization caused only minor disruptions. Downs stood in for the mayor as the keynote speaker at an awards luncheon sponsored by the Mayor's Committee on Handicapped Individuals. Barry also missed a meeting of the board of directors of the Union Station Redevelopment Corp.

Clifton Smith, Barry's staff director, routed most of the mayor's calls to Downs and the two other deputy mayors, Alphonse G. Hill and Ivanhoe Donaldson. Aides say that Barry helped put the finishing touches on the settlement of a legal dispute between his administration and the school board over the fiscal 1983 budget.

"Things are no more different than if the mayor had taken a vacation," Downs said.