A 70-year-old woman has been arrested in Sweden's capital on suspicion of holding her son captive at home for up to three decades, police and a prosecutor said.

Stockholm prosecutor Emma Olsson said the man in his 40s was found in the apartment by a relative on Sunday, after his mother had been taken to hospital, adding he may have been held for nearly 30 years.

Various Swedish media, citing the relative who found him, said the man was discovered lying on a blanket on the floor, unable to speak, and covered in sores and injuries and with almost no teeth.

"He's now in hospital ... I know that he needed surgery," said Ms Olsson, who gave no more details of his condition.

Expressen newspaper and others said the son was taken out of school aged about 12. He was found next to two almanacs from 1995 and 1996 on the wall in the apartment packed with clutter.

The relative said the apartment looked like it had not been cleaned in years.

"There was urine, dirt and dust. It smelled rotten," she told Expressen, adding that she had to wade through piles of junk to get through the hallways.

"No one could have cleaned that home for many years."

"I'm in shock, brokenhearted, but at the same time relieved.

"I've been waiting for this day for 20 years because I figured out that she was totally controlling his life, but I never imagined the extent of it," she said.

"I'm just thankful that he got help and is going to survive."

The mother is denying charges of false imprisonment and grievous bodily harm, Ms Olsson said in a statement.

There was no immediate explanation of why the son had been held.

Alerted to the case by hospital staff treating the man, police cordoned off the apartment in the southern Stockholm district of Haninge for investigations.

"We are looking into how long the son may have been imprisoned, but we assume it's been a long period of time," a police spokesman said.

One unidentified neighbour, who lived in the same building, told Aftonbladet newspaper that she ran into the man at a nearby supermarket a few months ago.

"I know who you are, you're my neighbour," the man had told her, recognising her after having seen her through the window, she said.

But most others in the neighbourhood told local media they had not seen the man for years.

"They almost never went outside, never even opened the windows for fresh air. It's been holed up," another woman from the building told Aftonbladet.

Many neighbours wondered why neither social services, the school nor any other authority ever checked in on the boy over the years.

"And when we've had renovations done in the building, how can no one have noticed? Workmen have been here," one woman told Aftonbladet.

Another woman said she occasionally ran into the mother.

"We talked about small stuff, like you do. Sometimes I asked about the boy, and she just said he was fine, she never really talked about him," she said.

She, however, added that she found it odd that their window was never open, and the same candlestick had been in the window for 30 years.

"But what can you do? How do you know what's going on behind closed doors? It's all so awful, you can't believe it's true," she said.