Delegates of the 35-nation Conference on Security and Cooperation in Europe, meeting here to review the progress of East-West detente, carried nine weeks of rancorous preparatory sessions to a suspenseful end with all-night debate to seek agreement on a agenda that would permit the summit to open Tuesday with some prospects of success.

Western diplomats indicated today that there was a new mood of cautious optimism after dreary predictions over the weekend that opposition by the Soviet Union to a thorough debate on human rights issues in the Eastern Bloc and on the Soviet invasion of Afghanistan spelled the collapse of the process of periodic East-West review conferences that has been among the most visible examples of potential benefits from detente.

[News services reported early Tuesday that the meeting went on with no progress into early morning with the clock artificially stopped at midnight to avoid a deadline. Despite the added time, however, no agreement was reached and delegates adjourned until later in the day, with the clock still stopped.]

["Our assessment at this point is that there has not been very much progress," a U.S. spokesman said. "We are prepared and determined to make every effort to find a solution to the problems that face us."]

Ambassador Max Kampelman, cochairman of the U.S. delegation, told a news conference that he could say only that "constructive moves" were being made, but declined to give details, saying that they could "contribute to prejudicial negotiations."

Kampelman, who was joined on the weekend by former U.S. attorney general Griffin Bell in heading the U.S. team, said that it he expected the conference to start on schedule. Reliable sources said that an impasse may have been avoided by a last-minute formula that would permit the conference chairman to include in his opening address the outstanding agenda issues on which the conference had failed to achieve consensus.

Right up to the end, the marathon preparatory sessions have seesawed between Western insistence that human rights issues agreed on at the first conference held five years ago in Helsinki should be exhaustively reviewed and the Soviet Bloc stand that the conference process should avoid recriminations and move on rapidly to new proposals on detente, in particular, a Soviet plan for a European disarmament conference.

The opposing positions on the use and purpose of the Conference on Security and Cooperation in Europe reduced the preparatory meetings to what one neutral delegate termed "a dialogue of the deaf."

As time ran out on the possibilities of opening formally with any framework for an agenda, neutral delegations, among them Austria, Switzerland and Sweden, moved to avert what both superpowers said would be disastrous consequences for detente. Both Kampelman and the Soviet delegation, which was strengthened today by the arrival in Madrid of veteran negotiator Deputy Foreign Minister Leonid Ilichev, stressed the seriousness of the situation and the political will to work hard.

Meanwhile, several human rights pressure groups have arrived here to lobby for a firm Western line on the plight of Eastern dissidents.

One, the American Helsinki Watch Committee, set up to monitor human rights conditions in the Soviet Bloc, released a poignant letter by Irina Valitova, wife of physics professor Yuri Orlov, the founder of the Moscow Helsinki Watch group who was arrested in 1977 and sentenced to seven years of prison camp and five in exile.

"My husband is 56 years old. His health is broken. . . . I fear he will not survive the unremitting persecution: the punishment cells, hunger, cold, solitary confinement, forced labor," the letter said.

Exiled dissident Ludmilla Alexeyeva, official representative abroad of the Moscow Helsinki Watch, urged the West to remain firm on the human rights issue. "Any compromise on human rights," she said today, "would create a type of detente which would not help the citizens of Eastern Europe."

The convergence of the lobby groups at Madrid on the eve of the conference opening appeared to ensure heightened public debate on human rights that could spill out of the diplomatic confines of the conference process.