Cardiomyocyte mitochondria are arranged in pairs sandwiched between the contractile machinery. Therefore, in response to contraction-relaxation cycle of the contractile machinery, the major ATP consumer, the mitochondria membrane should deform in 3D. Recent work has shown that membranal deformations affect the rate of ATP synthesis by nano rotary machines. We developed a novel live algorithm to quantify mitochondrial 3D-deformation in response to contraction and relaxation and designed a mathematical model to estimate if in response to contraction, mitochondrial membrane deformation can change ATP production rate. In response to cell contraction, the mitochondria contracted in the longitudinal axis and expended in the radial 2D axes with similar deformation dynamics in both sarcomere and mitochondrial structures. Our mathematical model predicted that mitochondrial deformation can significantly change ATP production rate during contraction-relaxation cycle. Therefore, mitochondrial 3D deformation dynamics can serve as a feedback loop between ATP major consumer and ATP synthase function.