Background/Objectives: The purpose of this research was to create a peak detection algorithm and machine learning model for use in triathlon. The algorithm and model aimed to automatically measure movement cadence in all three disciplines of a triathlon using data from a single inertial measurement unit and to recognise the occurrence and duration of cycling task changes. Methods: Six triathletes were recruited to participate in a triathlon while wearing a single trunk-mounted measurement unit and were filmed throughout. Following an initial analysis, a further six triathletes were recruited to collect additional cycling data to train the machine learning model to more effectively recognise cycling task changes. Results: The peak-counting algorithm successfully detected 98.7% of swimming strokes, with a root mean square error of 2.7 swimming strokes. It detected 97.8% of cycling pedal strokes with a root mean square error of 9.1 pedal strokes, and 99.4% of running strides with a root mean square error of 1.2 running strides. Additionally, the machine learning model was 94% (±5%) accurate at distinguishing between ‘in-saddle’ and ‘out-of-saddle’ riding, but it was unable to distinguish between ‘in-saddle’ riding and ‘coasting’ based on tri-axial acceleration and angular velocity. However, it displayed poor sensitivity to detect ‘out-of-saddle’ efforts in uncontrolled conditions which improved when conditions were further controlled. Conclusions: A custom peak detection algorithm and machine learning model are effective tools to automatically analyse triathlon performance.