Reason for: mostly staying inside, whether the person is on medication, their diet, what other means of social interaction they have and how they occupy their time.
I know a few people who chose never to leave the house for longer than 4 years, spent almost all their time playing video games, were served healthy home cooked meals and not on any medication.
Very little negative impact on their mental health.
But they all have terrible personalities and probably always did.
A habit of using other people in an exploitative way and causing lots of hassle to individuals that share their accommodation or get too involved with them.
Other people who had to stay inside because of very poor physical health, violent criminal attacks or hate campaigns with threats against their lives.
Most of those people were on medication, traumatised, experienced issues with frustration or loneliness and developed moderate agoraphobia.
The majority became moody, very dependent upon the television and text messaging, often stopped changing their clothes or answering phone calls.
Some developed speech problems, detached themselves from the outside world or became very over-friendly/possessive of visitors to their home.
People with hobbies, a balance diet and positive mindset seem to experience less detrimental impact upon their mental health.
There is almost always hope of some recovery for people that have never indulged in illegal activity.
Only exceptions being when the person has a history of arson or cannibalism, violent psychosis and has committed serious crimes where people were hurt/killed.