A heartbeat generates tiny mechanical vibrations, mainly due to the opening and closing of heart valves. These vibrations can be recorded by accelerometers and gyroscopes applied on a subject's chest. In particular, the local 3D linear accelerations and 3D angular velocities of the chest wall are referred to as seismocardiograms (SCG) and gyrocardiograms (GCG), respectively. These signals usually exhibit a low signal-to-noise ratio, as well as non-negligible amplitude and morphological changes due to changes in posture and the sensors' location, respiratory activity, as well as other sources of intra-subject and inter-subject variability. These factors make heartbeat detection a complex task; therefore, a reference electrocardiogram (ECG) lead is usually acquired in SCG and GCG studies to ensure correct localization of heartbeats. Recently, a template matching technique based on cross correlation has proven to be particularly effective in recognizing individual heartbeats in SCG signals. This study aims to verify the performance of this technique when applied on GCG signals. Tests were conducted on a public database consisting of SCG, GCG, and ECG signals recorded synchronously on 100 patients with valvular heart diseases. The results show that the template matching technique identified heartbeats in GCG signals with a sensitivity and positive predictive value (PPV) of 87% and 92%, respectively. Regression, correlation, and Bland-Altman analyses carried out on inter-beat intervals obtained from GCG and ECG (assumed as reference) reported a slope of 0.995, an intercept of 4.06 ms (R2 > 0.99), a Pearson's correlation coefficient of 0.9993, and limits of agreement of about ±13 ms with a negligible bias. A comparison with the results of a previous study obtained on SCG signals from the same database revealed that GCG enabled effective cardiac monitoring in significantly more patients than SCG (95 vs. 77). This result suggests that GCG could ensure more robust and reliable cardiac monitoring in patients with heart diseases with respect to SCG.