The inquest into the death in prison of a man convicted of stealing a gingerbread man during the riots in 2011 opens in London on Monday. James Best, 37, had a history of mental illness and physical problems, which his foster family say were not addressed by the prison.

Best died after collapsing at Wandsworth prison, south London, in August 2011. He had been convicted of theft at Croydon magistrates court and remanded in custody awaiting sentence. He had stolen the cake from an already looted bakery in Croydon. It was his first time in prison.

In July 2011, Best had been convicted of criminal damage and sectioned under the Mental Health Act after he self-harmed on a London street. He also had physical problems including Crohn's disease, arthritis, high blood pressure and asthma.

On the afternoon of 8 August, Best went to the prison gym, where he was described as "training really hard, really going for it". After the workout he returned to his cell and collapsed. An ambulance was called but by 5.10pm he had been pronounced dead, having suffered a heart attack.

Best, who was born in Lincolnshire, was placed in care at the age of 12 months. He was adopted and lived in Hastings until the adoption broke down when he was 15. He was then fostered by Dolly Daniel and stayed with her family until he was 18. At the time of his arrest he was living in Croydon.

Daniel, who will be attending the inquest, believes her foster son was let down by the justice and prison system. She criticises the courts for sending Best to prison "for stealing a cake from an already looted bakery" and not taking his mental health into account.

She says the inquest will raise issues about Wandsworth's failure to medically assess Best and claims he should not have been allowed to use the gym because of his poor physical health.

At the time, magistrates were issued with advice from the courts and tribunals service to disregard normal sentencing guidelines for offences committed as part of the 2011 riots.

"His mental and physical problems were not addressed and he was wrongly cleared to use the prison gym," she said.

Victoria McNally, a case worker for the campaigning charity Inquest, describes Best as a highly vulnerable man whose "death was a tragic end to a troubling sequence of events. We hope that this inquest will examine whether the procedures and safeguards designed to protect prisoners were properly followed."

Wandsworth has a troubled history. A 2011 report by the chief inspector of prisons found the safety of prisoners to be "a matter of serious concern". Between January 2010 and June 2011, there were 11 deaths at the jail. The report found Wandsworth compared badly with similar prisons facing similar challenges and inspectors were concerned by what appeared to be unwillingness among some prison managers and staff to acknowledge and take responsibility for the problems the prison faced.

Inspectors concluded: "The treatment and condition of simply too many prisoners at Wandsworth was demeaning, unsafe and fell below what could be classed as decent."

The Prison Service said it was "unable to comment before the conclusion of the inquest".

The inquest, at Westminster coroner's court, is listed for five days. It is the third inquest in a month into the death of a prisoner at Wandsworth.