Virginia Gov. Charles S. Robb flinches every time the telephone rings at the Executive Mansion in the middle of the night. He's equally uneasy when there's an urgent call on the weekend, like the one he got a couple of weeks ago while watching his daughter reign as queen of the Winchester Apple Blossom Festival.

"The first thought is that it has something to do with the corrections system," said Robb. "But I'm not paranoid."

In fact, Robb has every reason to think those late night and weekend phone calls mean more trouble in the prisons.

In the last year, they have brought Robb reports of the biggest escape from death row in U.S. history, prison riots and hostage sieges, inmate beatings and countless upheavals in the state's corrections department. The governor now refers to the state's prison system as his equivalent of the president's "little black box."

But a year after repeated revelations of long-ignored mismanagement in the corrections system, both prison officials and some of their harshest critics agree that Virginia officials have made dramatic strides in eliminating problems that many -- including Robb -- initially refused to admit existed.

Alvin J. Bronstein, director of the American Civil Liberties Union's National Prison Project and one of the most outspoken critics of the Virginia corrections system, said he has seen "remarkable changes." The troubled Mecklenburg Correctional Center, he said, "is not far from being a good prison," a major turnaround from four years ago, when Bronstein said conditions at the prison were "beneath standards of human dignity."

Improvements at the prison have been so substantial that the National Prison Project recently agreed to end its four-year legal battle against Virginia over conditions there.

The startling escape of six inmates from death row at the Mecklenburg maximum-security complex one year ago ignited one of the state penal system's most explosive periods. All of the escapees eventually were captured, but the May 31, 1984, breakout proved to be only one glaring symptom of pervasive problems in a system that had been allowed to degenerate into gross mismanagement, inept leadership and abusive inmate practices.

"The escape was not an aberration," said Allyn R. Sielaff, the third corrections chief the Robb administration has hired. "It showed a management problem from top to bottom."

The breakout made Virginia a laughingstock among corrections professionals and created a political liability for Robb. But the governor, warned that a failure to act could harm his Democratic Party in this fall's statewide elections, has moved on a wide front, pouring more money, training and new personnel into the state's large prison system.

"We learned about the difficulties of the system the hard way, no question about that," said Robb. "If the Mecklenburg escape hadn't taken place, maybe the problems never would have come to our attention and maybe we would have lost lives."

Although Robb now says it took him months to realize the severity of the problems within the 8,000-employe Department of Corrections, he declared the corrections system his number one crisis and hired the aggressive -- and controversial -- Sielaff to carry out his mandate for broad changes.

Bronstein called Sielaff and his new top deputies "a breath of fresh air as compared to what we've had in the past . . . . They didn't care. They were living in their own little anthill doing business as usual and rocking from one crisis to another."

Sielaff, who took the embattled corrections job only after persistent pressure from Robb, quickly burrowed into the department, reassigning many top staffers, eliminating key positions and launching a crusade to slash what he considered a flabby bureaucracy fed by patronage appointments and promotions. He said many officials were "over their heads" or "miscast" in their jobs.

He ordered sweeping changes at the troubled Mecklenburg prison, located near the North Carolina border, changes that included abandoning its controversial role as a repository for the worst of the state's prisoners. "Mecklenburg was not just a place of escapes," said Sielaff. "It was a place that . . . never worked the way it was supposed to."

The modern prison had opened eight years ago as a facility for the most aggressive and hostile inmates in Virginia. Critics warned that segregating the worst of the state's prisoners in one institution created an unmanageable powder keg, and Sielaff agreed. Opportunities -- and Security -- Increased

He also ended an inmate disciplinary program that had fallen into disrepute and that many corrections experts said was out of date before Mecklenburg opened. It stressed controlling inmates' behavior and provided virtually no work or educational progams for inmates, leaving them with long hours of idleness. That, said Sielaff, was dangerous.

Although corrections officials said Mecklenburg's design makes it difficult to establish work areas, they are attempting to bring some vocational programs to the prison and have expanded the number of teachers and educational courses offered there. They also have lifted many restrictions, including those that limited recreation.

Officials said they have significantly increased security at the sprawling, campus-like prison, which has 272 inmates and remains the most expensive prison to operate in the state.

Most importantly, Sielaff said, the former warden and many officials at the prison have been reassigned. Correctional officers have been required to upgrade their training and new prison leaders have instituted a greater communications network among administrators, supervisors, guards and inmates at the prison.

The biggest single contributing factor to last summer's series of disruptions, officials said, was the complete breakdown in management and staff communications within the prison. Former wardens seldom went into the prisoner housing areas, correctional officers were uninformed as to the most basic prison regulations and most guards were inadequately trained.

Sielaff's methods for attacking those problems agitated many, including the state Board of Corrections, the policy-making body for Virginia's prisons. And even with the advances the department has been credited, mammoth problems remain.

"We're not where we need to be, obviously," said Sielaff, noting that his staff is tackling problems that have been embedded in the system for years. Two-Thirds Didn't Belong There

Inmates routinely have been routed to the wrong type of prison, according to corrections officials. More than two-thirds of the inmates whose files were reviewed at Mecklenburg should not have been incarcerated there in the first place, according to a study completed last winter.

One of those inmates was an 18-year-old who was arbitrarily sent to Mecklenburg from one of the state's juvenile facilities where he had been serving a five-year sentence for what corrections officials said was a "relatively minor offense."

Under old policies, wardens at the state's 42 prisons ruled their institutions like independent fiefdoms, often ignoring departmental policy. As a result, treatment of inmates varied dramatically from institution to institution.

Sielaff said the department has only just begun to start examining the lack of uniformity in prison policies, an effort that is being thwarted by a system that has the second largest number of prisons of any state in the nation -- the legacy of a corrections program designed to use inmates to maintain the state's sprawling road network.

At some prisons, basic security requirements frequently went ignored, allowing preventable escapes. At Mecklenburg, a maintenance shop was located under- neath death row, giving the May 31 escapees quick access to a metal-sharpening emery wheel that was used in the breakout. A poorly placed guard tower at Nottoway Correctional Center in central Virginia allowed five inmates there to snip their way unnoticed through a double fence and escape on Thanksgiving.

After imposing stopgap security improvements at Mecklenburg and Nottoway, officials only recently initiated an intensive security audit of the state's major prisons. Sielaff said he expects to recommend major technological overhauls that could cost $300,000 per prison.

Still, some major security precautions remain to be taken. It was only last week that officials at Mecklenburg secured protective steel bars for the prison's arms and ammunitions arsenal located inside the prison compound.

Sielaff already has dissolved 10 of the top 24 positions on the administrative staff of the Department of Corrections and said he plans to slash about 15 percent of the remaining 300 jobs in the central office.

"It's too big and it's too fat," said Sielaff. "I want to make it lean and efficient. I've never seen a central office this big. I'm not through."

Prison officials and their critics said one of the greatest inadequacies of the Virginia prison system is lack of work and educational programs for inmates. It was a problem that many officials say contributed significantly to the last year's uprisings and escapes.

"When inmates have nothing to do all day, it creates management problems," said Sielaff.

In fact, James D. Briley, who along with his brother Linwood, masterminded the breakout from Mecklenburg's death row, said during an interview only hours before his execution in April that the brothers had spent two years plotting the escape.

"I had a choice," said Briley, 28. "I could sit back and believe in the judicial system -- so far it hasn't worked for me -- or escape and possibly help myself."

Corrections officials say they are far from regaining public trust in the system. "The public just has not had confidence in the department," said Sielaff. "We still lack that." Another Escape Possible

Officials are attempting to combat their image by holding seminars for wardens to teach them how to deal with the news media. Tomorrow, Mecklenburg Warden Toni V. Bair will host a "media day" at the prison, giving reporters guided tours of the stark grounds and squat, brick cell blocks. Later this summer, Bair said, he plans to begin prison tours for the public.

Could there be another escape in Virginia similar to the death row fiasco at Mecklenburg?

"Anybody would be foolish to tell you there couldn't," said state Sen. Joseph V. Gartlan Jr. (D-Fairfax), who chairs the Senate committee that oversees funding for the prison system.

"We could spend an enormous amount of money, buy the most sophisticated equipment and you still can't proceed on the basis of absolute certainty," Robb agreed.

Asked to rate the Virginia corrections department on a scale of one to 10, with one being the crisis situations of last summer and 10 being where officials would like to see the system, Sielaff's chief deputy, Edward W. Murray, gave the system a seven. The ACLU's Bronstein separately gave the same response, a sign of how much the gap has narrowed between state officials and their critics.

"The changes that have been made seem to have a positive impact," said Robb. "But until we have had a very long period of time without any substantial incidents that generate public interest and generate the calls in the middle of the night, the system won't look like it's performing all that effectively."