If a prisoner dies in the jail or house of correction, the sheriff or keeper shall, except as provided in chapter one hundred and thirteen, deliver the body to his relatives or friends if they request it; otherwise, he shall bury it in the common burying ground, and the expense thereof shall be paid by the town where the deceased had resided.
Mass. Gen. Laws ch. 126, § 22