Behavioural states such as walking, sitting and standing are important in indicating welfare, including lameness in broiler chickens. However, manual behavioural observations of individuals are often limited by time constraints and small sample sizes. Three-dimensional accelerometers have the potential to collect information on animal behaviour. We applied a random forest algorithm to process accelerometer data from broiler chickens. Data from three broiler strains at a range of ages (from 25 to 49 days old) were used to train and test the algorithm, and unlike other studies, the algorithm was further tested on an unseen broiler strain. When tested on unseen birds from the three training broiler strains, the random forest model classified behaviours with very good accuracy (92%) and specificity (94%) and good sensitivity (88%) and precision (88%). With the new, unseen strain, the model classified behaviours with very good accuracy (94%), sensitivity (91%), specificity (96%) and precision (91%). We therefore successfully used a random forest model to automatically detect three broiler behaviours across four different strains and different ages using accelerometers. These findings demonstrated that accelerometers can be used to automatically record behaviours to supplement biomechanical and behavioural research and support in the reduction principle of the 3Rs.