Soviet Premier Alexei Kosygin, who has been absent from public sight for more than a month, has suffered a heart attack, reliable Western sources reported here today.

Kosygin, 75, was stricken three to four weeks ago and is undergoing medical treatment, the sources said. It is considered unlikely that he will attend next week's plenary session of the Communist Party Central Committee and Supreme Soviet, the figure-head parliament, to adopt the 1980 budget and economic plan, which Kosygin's Council of Ministers runs.

His illness comes as unofficial but reliable Soviet sources report that President Leonid Brezhnev and the ruling Politburo are working out a plan for an orderly and smooth transfer of power to new Kremlin leaders, beginning next autumn.

According to the scenario, parts of which have filtered into the Western press in recent days, the 26th party congress scheduled for the spring of 1981 would be advanced to next autumn to approve the transition.

The ailing Brezhnev would remain as president but turn the party leadership -- the wellspring of Kremlin power -- over to a younger man acceptable to the 13-member Politburo, and he would rule as Brezhnev's surrogate. Some Soviet sources suggest Moscow party boss Viktor Grishin, 65, is a likely successor, while Western analysts think Brezhnev's long-time chief administration, Konstantin Chernenko, 67, a likely candidate. Neither man has party power independent of Brezhnev, and both would need the 72-year-old leader's support to survive while consolidating power in his own name.

As a Soviet source said, "In other words, Brezhnev continues to rule, but does not have the responsibility that now bothers him and affects his health."

For Brezhnev, the most decorated Soviet leader since Stalin, the fruits of such a sequence are clear. It would achieve a smooth transition for the first time since the Bolsheviks seized power 62 years ago, and it could insure that his policies continue well after he relinquishes direct command to become a revered senior statesman, something which has eluded his predecessors. b

At the same time, the earlier party congress would find a successor for Kosygin, who has headed the government and its vast economic bureaucracy since 1964 when he and Brezhnev emerged as the "collective leadership" after costing Nikita Khrushchev. Kosygin has steadily lost power to Breshnev since, and one unofficial source said he has sought several times to retire, Kosygin, who will be 76 in February, reportedly suffered a heart attack and almost drowned while swimming in the river near his country home in 1976. He was absent for three months then, but the Soviets never confirmed the reports.

No official Soviet source would confirm the latest reports of Kosygin's illness, although some sources have suggested he may be suffering from kidney malfunction as well.

Some here suggest that either Defense Minister Dmitri Ustinov, 71, a civilian who is experienced at running the weapons industry, or Russian Federation Premier Mikhail Solomentsev, 66, are possible Kosygin successors. His senior deputy, Nikolai Tikhonov, 74, is thought to be too old to succeed his boss.

Unmentioned in all this is Andrei Kirilenko, 73, the longtime Brezhnev crony whose resilience has made him a potential heir because of his deep party associations. But, his fortunes may have taken a downswing. An Azerbaidzhan party newspaper illustrated its revolution day article with photos of the four principal Kremlin leaders: Brezhnev, Kosygin, ideologue Mikhial Suslow, and Chernenko. Last year, kirilenko was in the picture, not Chernenko, who has been a Politburo member little more than a year.

Grishin and Chernenko are known chiefly to Western observers as men who have closely mimicked Brezhnev on many issues, including his repeated assertion that the Soviet economy, plagued with problems, needs no fundamental change that could reduce party control, but will thrive from increased ideological strength. The economy has slackened its growth through the 1970s, and fallen short of most important production goals.

Whether either man upon reaching the pinnacle of party power would deviate from the Brezhnev foreign policy of Soviet expansionism coupled with detente is impossible to say. They have never deviated from the party positions on these matters. But it is clear that the Soviets have been at some pains to show the West they are thinking about the succession problem. Last spring, unofficial Soviet sources said an interim succession plan with Kosygin as temporary president had been agreed to if Brezhnev had been too sick for the Vienna summit with President Carter.

As Brezhnev a strength has ebbed, Western officials have focused on the succession question. Seen from here, it seems plausible that Kosygin's latest illness may have prompted the unofficial leaks about the shape of things to come in the Kremlin to assuage Western concerns in an age of nuclear parity with the United States.But any purported succession preview must be qualified by saying that virtually nothing is known of the internal strains within the Kremlin leadership.

What is clear is that Brezhnev is the key to the power balance and the other Politburo members have been unable or unwilling to push him aside despite his infirmities. The plan being aired in official circles and passed on to Western correspondents could become the means by which his power and policies will be extended into the next decade.