Marvin Mandel returned to the State House tonight and watched the final turbulent hours of the General Assembly session from a comfortable perch in the Senate gallery. The former governor puffed on his pipe and told one and all that there was really nothing to worry about that the deadlock the legislature found itself in as midnight approached would somehow be resolved.

"It's par for the course. It'll all be over by 12 o'clock," said Mandel, as legislative leaders scurried around below him. "Tensions rise, people get short-tempered, but it will all work out."

Mandel, with his wife Jeanne at his side, as always, seemed totally in his element once again, only three months after he left his second floor office for the last time on Jan. 17. He casually strolled over to the House gallery now and again to place telephone calls to some of his old delegate friends seated down on the House floor. "You're looking good," said Mandel to one woman delegate as he peered over the balcony.

As Mandel Joked with some friends and posed for pictures with a college sorority group, his successor, Gov. Harry R. Hughes, remained cloistered in his office, conferring with press secretary Gene Oishi and picking up periodic reports on the legislative deadlock from his aides.

The state trooper who guards Hughes said the governor arrived at his office at 8:30 this morning and did not budge until 9:30 tonight. Then, he emerged from his office only briefly, taking 20 steps down the halfway before turning around. "He ran into that crazy guy Melvin Perkins in the hall and just turned right around and went back into his office," said the state trooper. 'And he hasn't been out since.'

According to Oishi, Hughes spent the early evening hours talking by telephone with House Speaker Benjamin L. Cardin and Senate Majority Leader Rosalie Abrams, trying to determine how the unexpected final-hours deadlock could be resolved. By 9:30, as the situation looked bleak, Oishi said Hughes and his legislative counsel, Jud Garrett, began drafting a proclamation extending the legislative session another day.

"We might need it, we might not," said Oishi. "This is just in case."