Marshal Dmitri Ustinov, the Soviet defense minister, suffered a stroke last month that left him temporarily incapacitated, it was learned here today.

East European sources said the 76-year-old Ustinov was recovering, although it is expected that he may have to relinquish his position as defense minister.

There were no indications whether the defense post would be turned over to another civilian figure or would go to a professional soldier. Ustinov, however, is expected to recover sufficiently to return to his duties as a member of the ruling Politburo and, if he does, presumably would continue to exercise great influence on military affairs because of his seniority and experience.

It was not known when the marshal suffered what appears to have been a cerebral hemorrhage, but it must have been in the second half of October. The sources said he collapsed while addressing a military gathering and was hospitalized immediately.

He was last seen in public Sept. 27, when he presented the Order of Lenin, the nation's highest decoration, to Soviet President Konstantin Chernenko.

Speculation about Ustinov's health started Oct. 30, when he failed to welcome the visiting Indian defense minister, S.B. Chavan.

Chavan was instead met on arrival here by Pavel Finogenov, the minister of defense industries, Igor Belousov, the minister of shipbuilding, Marshal Sergei Sokolov, first deputy minister of defense, and Marshal Sergei Akhromeev, the chief of staff.

Since Chavan hastily returned to India less than 24 hours later because of the death of prime minister Indira Gandhi, it was not clear whether Ustinov's absence was due to temporary indisposition or a more serious ailment.

Ustinov subsequently failed to appear at the annual Red Square military parade on Nov. 7, touching off rumors that he was seriously ill. Soviet officials told reporters that he had a cold.

Marshal Sokolov took the military salute in place of Ustinov and thus appeared to rank second in the military hierarchy. Sokolov, 73, has been one of the three first deputy defense ministers since 1967.

Ustinov, a civilian and an engineer by education, has been one of the country's top modern technocrat-politicians since he was appointed armaments minister in 1941. He was 32 at the time, the youngest man ever to become a member of the Soviet Cabinet.

Except for a stint as deputy premier under Nikita Khrushchev, Ustinov has been deeply involved in the defense sector ever since.

He was appointed minister of defense in 1976 to succeed Marshal Andrei Grechko, a professional soldier. At the time, Ustinov held a reserve rank as colonel general.

In a gesture apparently aimed at making his appointment more palatable to military professionals, Ustinov was first given the rank of general of the Army and three months later was promoted to the rank of marshal.

He and the late Alexei Kosygin successfully organized one of the most important operations in World War II, the transfer of more than 340 industrial enterprises from western Russia to the Urals and beyond. The operation was carried out despite the German drive on Moscow during the summer and fall of 1941.

His reputation as minister of armaments is legendary. Mobilizing industry for a total war effort, he earned the title Hero of Socialist Labor in 1942 and numerous awards normally reserved for combat commanders. With the exception of Foreign Minister Andrei Gromyko, Ustinov holds more Orders of Lenin than do the rest of the members of the Politburo combined.