Last July he was taken to Christchurch Hospital by ambulance with severe abdominal pain and diagnosed with acute pancreatitis.
Cunningham was discharged a few weeks later, only to be readmitted on August 18.
He underwent surgery and intensive therapy but his condition continued to deteriorate, the inquest heard.
After a planned discontinuing of life support, Cunningham died in the presence of his family in the hospital's ICU on October 24, last year.
Senior constable Paul Hughes told the inquest police were satisfied there was no criminal liability or suspicious circumstances surrounding the death.
Department of Corrections inspector Trevor Longmuir came to the same conclusions.
Cunningham had received "appropriate" health support at Rolleston Prison, he found.
Coroner Richard McElrea said he will issue written findings in coming weeks.
"I'm satisfied this was a natural death incidental to Mr Cunningham being in prison and I accept the opinion of Mr Longmuir that the level of medical treatment and care was consistent and appropriate."