When the Maryland General Assembly convened three months ago the prevalent opinion held by State House politicians was that Senate President Steny H. Hoyer (D-Prince George's) could lose everything and gain nothing from the 1978 session.

The feeling was that if Hoyer floundered in his leadership role, as some of his colleagues believed he had the year before, his campaign for the Democratic gubernatorial nomination would fold. If Hoyer did his job well, the most many of his colleagues thought he would get out of it was second billing to his primary opponent, Acting Gov. Blair Lee.

That opinion is now being reassessed. As the 90-day session ended this week, there was a widespread belief in Annapolis that Hoyer - more than Lee or anyone else - had come out on top.His performance here by no means turned Hoyer into a front-runner in the campaign for governor, but it did give his candidacy the flavor of potential success - something it lacked in nearly two years of determined campaigning.

"I don't see how it could have gone any better," said Sen. Arthur H. Helton (D-Harford County), one of 10 state senators who have publicly endorsed Hoyer. "Steny has shown a skill and even-handedness this year that I think has impressed us all."

Such praise is not confined to Hoyer's political boosters. Last year, Sen. John C. Coolahan (D-Baltimore County) called Hoyer the "goat" of the session and said the 38-year-old Prince Georgian had not been tough enough in controlling the Senate.

Coolahan had his share of floor arguments with Hoyer this year, perhaps more than any other senator, but he has come away with more respect for the president. "I've seen something that I hadn't seen the past three years," he said, "and that's the leadership hustling the votes ahead of time. That's the way to do it - that's good leadership."

In part, Hoyer's emergence is the result of careful planning. "Steny was very sensitive to the criticisms last year," said one aide. "He felt they were unwarranted. And we were very fearful of how this session would go. We did a lot of spadework before hand to make sure the session went as smoothly as possible."

The planning involved details that no one but politicians would appreciate - things like getting committees to work on important bills the first week of the session; going over a computer print-out with chairmen and vice chairmen every week to determine where and why measures were backing up; letting vice chairmen handle more bills on the Senate floor and urging committees to meet on Saturdays and Mondays.

"He had everything jumping from the beginning," said Sen. Rosalie Abrams (D-Baltimore City). "If anything, he worked us too hard."

Despite this preparation, Hoyer is the first to admit that his success can be attributed mostly to circumstances that were not his doing.

A legislature that for several years had been squirming under the dominance of the executive branch was given the opportunity to blossom this year when Marvin Mandel - one of the most powerful governors in Maryland history - was removed from office by a political corruption conviction.

A legislature that since its inception had an unwritten but established mode of operation was at first startled and then turned off by the new governor. Lee developed many of his programs without consulting the politicians and argued the merits of his positions before the television cameras rather than private with the lawmakers.

On most of the major issues of the session, this new and uncertain relationship between Lee and the legislature served to Hoyer's advantage.

When Lee introduced a package of ethics bills that insulted many legislators because it was primarily the work of the Common Cause lobby - a group in disfavor with many State House politicians - Hoyer worked with his colleagues to develop a less stringent, more acceptable ethics package. It failed too, however.

There had been earlier confrontations - most notably on the best method for property tax relief - but the dispute over the ethics package marked the first time that Lee and Hoyer openly discussed the political implications of it all.

"I'll go along with a certain amount of game-playing," Lee snapped at a press conference in late March. "But when it starts messing up good legislation, then it's no longer funny."

Responded Hoyer: "It's a very good public relations gimmick to be for a very strong bill, but if the very strong bill can't pass, it doesn't seem to me too meaningful."

By the time this public sniping took place, the perceptions of power - who had it and who did not - had already shifted noticeably in Annapolis. Lee had by then been criticized in the press for his apparent ineffectiveness. Hoyer's name was appearing in more and more accounts of the daily actions.

Last week, when the issue that some Baltimore politicians believe will have more bearing on the gubernatorial primary than any other - the site for a new prison in Baltimore - came to a head, it was Hoyer, not Lee, who seemed to be in control. Lee had been pushing a site at Fort Armistead in south Baltimore, Hoyer had been straddling.Then, on Thursday morning, Hoyer made his move. Here is how one Baltimore newspaper, the Sun account put it:

"Steny H. Hoyer, the Senate president, ambled into the Budget and Taxation Committee yesterday morning and, with a few whispers to his allies, virtually put an end to the Continental Can-Fort Armistead prison dispute."

"I had to laugh when I saw that," said one Prince George's delegate. It sounded like the kind of thing they used to write about Mandel."

The fact that Hoyer's move on the prison dispute was to support Lee's position seemed secondary to his show of power, a show that was not lost on Hoyer's colleagues.

Hoyer said he decided to go with the administration bill because "it was the right thing to do - it was not a time to play games." His decision was an agonizing one, he said. One of his aides said Hoyer took a pensive stroll around the State House circle to consider the options.

Many of Hoyer's colleagues viewed his action in political terms. "There are more votes in East Baltimore (the vicinity of the Continental Can site) than there are in south Baltimore," said one senator. "It was the votes Steny was after, and it was his handling of it that came through."

Hoyer did more than any Senate president in Maryland history to get himself known this session. He hired a public relations aide in January, former television reporter Pat McGrath, who spent the last three months selling Hoyer to the public.

McGrath could be seem roaming the State House halls and ground every day, a tape recorder tucked under his arm, looking for opportunities to record the utterances of his boss. Because Hoyer is the Senate's presiding officer, and as such does not usually participate in floor debate, McGrath either records Hoyer at committee hearings or interviews him himself.

"Steny's problem in terms of radio and TV is that he often takes such an informal approach," said McGrath. "He tends to give these little asides to the people he's talking to, and I'm standing there thinking, 'Oh, come on, get on with it.' I've tried to get him to think about the key elements of what he's going to say, to speak in condensed terms."

McGrath succeeded to the extent that on most days, he got Hoyer's voice on about 24 radio stations around the state, from Hagerstown to Salisbury. McGrath also instituted weekly press conferences held by Hoyer and House Speaker John Hanson Briscoe (D-St. Mary's County). For the past three weeks, these press conferences have attracted four television stations and dozens of radio and newspapers reporters and have served as a counter to Lee's Thursday conferences.

This week, when the session ended, so, too, did the press conferences and the extensive radio coverage. Steny Hoyer is today just another candidate competing for endorsements, votes and good press.

"Steny had more hurdles to pass than anyone else," said Sen. Melvin (Mickey) Steinberg (D-Baltimore County), another of his 10 senate supporters. "It's unfortunate that this session had to be a test for him, but it was, and he came out extremely well. The next six to eight weeks will determine whether he goes all the way."

All the way, for Hoyer, does not at this point mean winning the primary.It means turning off the rumours that he will drop out and join someone else's ticket before the July 3 filing deadline.

"Ihaven't absolutely precluded my options," Hoyer said in a recent interview, snapping his fingers loudly and impatiently. "No one has done that yet. If it's there by the middle of May, I'll announce and run. I'm certainly better off than I was three months ago."