As you can read in the Cell Respiration review, the energy from electrons of the respiratory chain is used to pump protons out of the inner mitochondrial membrane.
The process creates a higher concentration of hydrogen ions outside the inner membrane and such concentration forces hydrogen to return to the mitochondrial matrix through the ATP synthetase, a passage that ultimately makes ATP synthetase to produce ATP.