Indeed, people who suffer from certain mental illnesses can still have clear understandings of the significance of their actions. For example, a person with a multiple personality disorder who is properly medicated and suffering no symptoms can often be considered to have clear understanding, as can a bipolar person who isn't showing symptoms. But what constitutes that "capacity to contract" has many gray areas, so I strongly recommend you (or whoever is involved in this) get expert consultation, legal advice or both before proceeding with any signings of contracts.
Also, laws defining mental competence vary by state. In most states, the degree to which a person understands the meaning and effect of a contract's wording, otherwise known as the "cognitive test," carries the most weight. However, in other states, an "affective test" is used to determine if a person understood the meaning and effect of the contract's wording, and the other party had reason to be aware of that person's condition. In others, a "motivational test" is used where courts determine if the person in question ever had the ability to judge whether or not to enter into a contractual arrangement.
Typically, the burden of proof in court cases pertaining to this is on the party who claims limited mental capacity. It is not unheard of for a court to decide against such an adult claimant who has not been legally declared incompetent and thus has no legal guardian. In cases of dementia, an ill person who has not executed a durable power of attorney, will or other proxy empowering a relative or another legal authority to handle contracts and other important decisions may have to wait for a so-called good day to read and sign. But sometimes those decisions can come under legal scrutiny by unhappy relatives or other interested parties.
In other words, it is important that all major decisions involving this mentally ill person be done aboveboard. The payee of that Social Security income you're talking about and his or her legal guardian may not be one in the same. It is that guardian who should be carefully considering any potential real estate agreements.
Ask the adviserTo ask a question of the Real Estate Adviser, go to the "Ask the Experts" page and select "Buying, selling a home" as the topic. Read more Real Estate Adviser columns and more stories about mortgages.