Two diplmats from the U.S. team that negotiated maritime and fisheries agreements in Havana this week remained behind to interview Americans being held in Cuban prisons, State Department officials said yesterday.

The activities of the diplomats, Wayne Smith and Frank Willis, were confirmed by officials only after word leaked to reporters. Neither the diplomats' continued stay in Cuba nor the permission given them to interview American prosoners was disclosed in the government announcements and press conferences Thursday about the signing of the U.S.-Cuban agreements.

Twenty-four Americans, some of whom hold dual Cuban citizenship, are reported to be imprisoned in Cuba. About six of these are believed to be hijackers of aircraft or ships who subsequently ran afoul of strict Cuban laws. About eight of the prisoners are believed serving time for political acts.

Cuba's decision to permit the interviews is considered by some to be another small step in the still-fragile process of improving relations between the two countries. Swiss diplomats, who have represented U.S. interests in Havana since U.S.-Cuban relations were broken off in 1961, have interviewed the American prisoners under international law permitting diplomatic access to foreigners who are jailed. For the last 16 years, the United States was in no position to request interviews becausethere were no American diplomats in Havana.

The seven-member State Department negotiatingteam departed for Cuba and returned under conditions of unusual secrecy. One reason may have been that only five diplomats came back. State Department sources said Smith and Willis are expected to return from their interviewing mission over the weekend.

David Nirebberg, 25, of Philadelpia, who spent 15 months in Cuban prisons in 1973 and 1974, told the Associated Press yesterday that American hijackers have been beaten and tortured in Cuban jails. Nirenberg said the jailing of the hijackers and their treatment behind bars is often brought on by their repeated protests against a government that won't let them leave.

Nirenberg and Susan Brown, who were seized after their sailboat drifted into what their captors said were Cuban waters, were freed late in [WORD ILLEGIBLE] as a goodwill gesture following the visit to Havana of Sens. Jacob K. Javits (R-N.Y.) and Claiborne [WORD ILLEGIBLE] (D-R.I.).

State Department officials would not say yesterday whether the repatriation issue had been raised this week in Havana.