An investigation has found that the behaviour of officers contributed to the death of an inmate who was restrained in prison.