Acting on the advice of his doctors, Maryland Gov. Marvin Mandel yesterday transferred all the formal powers of his office to Lt. Gov. Blair Lee III for an indefinite amount of time.

Mandel's decision to appoint Lee acting governor followed two months of severe headaches, fatigue and physical uncertainty that his physicians said was the result of a possible small stroke.

After 22 days of hospitalization and the postpontment of his political corruption retrial the 57 year old Mandel finally appeared in court Wednesday for jury selection. He looked confused and dazed in that first public appearance outside his home since April 5, and literally stumbled to his knees as he entered for the opening of what is expected to be a physically demanding four-month trial.

"This decision is solely that of my physicians, and I must abide by their skilled judgments and their concern for my health," Mandel wrote in the letter transferring the power yesterday.

"I have every assurance from my physicians that full restoration of the vigorous health I enjoyed before my illness can be accomplished through an adherance to the scaled-down regimen that has been prescribed for me," Mandel wrote in his three-page letter to Lee.

Lee will serve as acting governor until Mandel's health is restored, the governor said.

Although Mandel did not mention his political corruption trial in the document, the governor acknowledged last week that it was "quite possible" he would name Lee acting governor if the court schedule was too heavy.

On April 5 Mandel was hospitalized wit what doctors later described as a small minor stroke but never firmly diagnosed. For 22 days Mandel lay in a hospital room, undergoing numerous tests but holding on tenaciously to the reins of government.

For brief periods and for very limited purposes he would assign acting powers to Lee but he continued to make the major decisions as governor, relying on his staff and his wife to keep him up to date on state affairs.

Those close to Mandel repeatedly urged him to relinquish his powers for the sake of his health but he refused. It was an anguished Mandel who finally told reporters last week that he finally admitted what those close to him had been saying privately for weeks: that he probably could not stand trial and govern at the same time.

Under Maryland's Constitution Mandel is empowered to appoint Lee acting governor for whatever time he (Mandel) thinks necessary and in his letter yesterday Mandel left Lee's appointment open.

"I designate you as acting governor until I am pronounced fully able to resume the duties and obligations of my office," Mandel wrote.

While Lee assumes all the duties and responsibilities of the governor Mandel will retain his salary, his home in the state mansion and other benefits such as use of a limousine.

On May 27 Mandel's physicians declared him sufficiently recovered to stand trial for the second time on multi-count corruption charges with five co-defendants.

However, they recommended four-day week in court with an abbreviated five-hour day that includes a two-hour lunch break. In his first trial, which was aborted because of two outside attempts to tamper with the verdict, the schedule was a seven-hour day with a 75-minute break.

U.S. District Judge Robert L. Taylor initially denied the motion, saying he will reconsider it once the jury is seaed. Taylor said he anxious to select the jury as quickly as possible and he has held court daily, including a half-day session yesterday that Mandel attended.

Mandel has maintained that his appearance throughout the trial was essential, that "the trial is the most important thing in my life, other than my health, and I want to stay alive."

This transfer of power is important for the growing field of gubernatorial candidates which includes the 60-year old Lee. Although Lee's appointment as acting governor may increase his stature in voters' eyes. it comes at a time of fresh controversy surrounding the governor's office.

Renewed charges of a impropriety were made last week when the state secretary of transportation, Harry R. Hughes, resigned his post in Mandel's cabinet. Hughes charged that the process of awarding contracts for Baltimore's billion-dollar subway construction had been "tainted" and "tampered with" by a politically influential contractor.

Mandel's illness has been especially difficult for he has long prided himself on his Herculean work schedule, which allows little sleep and long days. Now, he said recently, he can work only 90 minutes at a time befoe he begins to tire. He said his doctors estimated that he still has a "30 per cent weakness."

Always in the best of health and a man who considered himself something of an athlete, Mandel rose steadily up Maryland's political system with a combination of hard work and astute decisions.

As a delegate from Northwest Baltimore, Mandel was chosen Speaker of the House in the State's General Assembly in the Sixties while in that position, Mandel was chosen by the Assembly in 1969 to succeed then-Governor Spiro T. Agnew when Agnew was elected vice president of the United States.

Mandel easily won election for governor in 1970 and re-election again in 1974. Under the state's Constitution Mandel cannot run for a third term in 1978.

But the good fortune that seemed to follow Mandel's climb began to take a different turn soon after his divorce from his wife of 32 years in 1974 and his remarriage the same year to Jeanne Blackistone Dorsey.

Soon after there were reports of a federal investigation into political corruption that led to the 1975 indictment and his trial. Federal prosecutors alleged that Mandel received some $200,000 worth of gifts from his five friends and codefendants in return for his influence over legislation that would benefit the friends' businesses, most notably the Marlboro Race Track.