Some 50,000 Cubans and possibly many more will be affected directly by President Fidel Castro's sweeping new program for the release of political prisoners and reunification of families separated by exile.

But the fate of most of them, Castro said at a post-midnight news conference this morning, now rests in the hands of the United States.

Bouncing the human rights ball right into President Carter's court, Castro said the United States has "a moralobligation" to accept political prisoners and to quickly process their entry applications.

[In Washington, State Department spokesman Hodding Carter III welcomed Castro's announcement and said the United States is studying ways to accelerate screening of prisoners who wish to come. He said that in general, they will be permitted to immigrate if they are not screened out as criminals or potential spies].

[A Justice Department spokesman, John Russell, said the screening process will be expanded, probably by the addition of more personnel, but that there will be no departure from the ease-by-case consideration.]

Castro said virtually all of the present and former political detainees had been encouraged and financed by the United States in anti-Castro acts going back to 1959.

His announcement came after two days of negotiations with 75 Cuban exiles invited here to work out final terms of the new policy. Euphoria swept the lobby of the Riviera Hotel when news of the government's actions arrived around 1 a.m. Scores of former prisoners, prisoners free on passes and their families had been gathered there for hours, awaiting word.

Many of them joined Castro and Bernardo Benes, an exile banker from Miami who headed the delegation, in urging the Carter administration to speed up procedures of allowing quick U.S. entry.

"I don't see how Jimmy Carter can say no to any of these people," said Benes, who actively campaigned for Carter in the 1976 Campaign. "I supported him partly because of his stand on human rights. Now is the time for him to respond - maybe this Sunday morning would be a good time to do it. To bring them to the United States is to reaffirm the moral basis on which our society is built. Be merciful. These people are desperate. They want to leave. They want to be reunited with their families."

During the two days of meetings and again at his press conference, Castro expressed puzzlement at the "slowness" with which the United States has moved in screening applications of Cubans cleared here in a series of limited releases since September.

"I don't understand why the United States wanted to take in hundreds of thousands of technicians, half of our doctors, and why now, at this time, the United States resists a resolution of this problems," he said. "No. U.S. administration can deny these people - and even less an administration that has talked so much about human rights."

Although critical of U.S. policy toward Cuba, Castro's tone was generally warm when mentioning Carter's name. He said Cuba is able to undertake the prisoner release and reunification program because Carter is the first president who has not been hostile toward this country.

Castro did, however, last out at the administration for its public show of concern over the presence of new Soviet-supplied Mig 23 warplanes. The administration resumed spy flights over the island in an attempt to determine the nuclear offensive capabilities of the Migs.

"Why this ridiculousness? This pseudo crisis?" Castro asked. "These not strategic aircraft. They are defensive planes, tactical in nature. We have had Mig23s for a year and their acquisition had been planned for many years. They have been flying over Cuba for eight months . . . It is a mystery why the United States is reacting now."

He said the Mig23 situation would not be allowed to stand in the way of continuation of the prisoner release program or liberalized travel into and out of Cuba.

Considerable confusion still exists about the actual numbers of Cubans who would be able to leave permanently. According to Benes, Castro said he expected that at least 50,000 would be free to go.

Castro indicated that most of the 3,238 political prisoners now in jail will be freed. Some judged to pose a threat as future terrorists would be held. Others guilty of non-political crimes might not be released.

Also in the doubtful category are 425 persons accused as war criminals - many of them from the government of Fulgencio Batista that Castro overthrew. But another 600 persons imprisoned for attempting to flee the country illegally in boats are to be removed from the jails, as will all 50 women political prisoners.

Castro said prisoners will be freed at a rate of about 400 per month if the United States expedites the processing. He said that 50 to 60 percent of them want to go to the United States. He indicated that all of the 6,000 to 8,000 former political prisoners now free here will be able to leave with their families. Other sources here contend that there are at least 14,000 former prisoners on the island, most wanting to leave.

Cubans living abroad are to be allowed to return here in certain humanitarian cases - old age, sickness, family problems. Others may not return because of the housing shortage.

Beginning in January, Cuban exiles may return as tourists in tour groups or, in some special cases, individually. Cuban citizens for the first time will be allowed to go abroad as tourists, as long as their travel fares are paid by sources outside Cuba.