Heat stress (HS) negatively affects animal productivity and welfare. The usage of wearable sensors to detect behavioral changes in ruminants undergoing HS has not been well studied. This study aimed to investigate changes in sheep’s behavior using a wearable sensor and explore how ambient temperature influenced the algorithm’s capacity to classify behaviors. Six sheep (Suffolk, Dorset, or Suffolk × Dorset) were assigned to 1 of 2 groups in a cross-over experimental design. Groups were assigned to one of two rooms where they were housed for 20d prior to switching rooms. The thermal environment within the rooms was altered five times per period. In the first room, the temperature began at a thermoneutral level and gradually increased before decreasing. Simultaneously, in the second room, the temperature began at hot temperatures and gradually decreased before increasing again. Physiological responses (respiratory rate, heart rate, and rectal temperature) were analyzed using a linear mixed-effects model. A random forest algorithm was developed to classify lying, standing, eating, and ruminating (while lying and standing). Thermal stress shifted daily animal behavior budgets, increasing total time spent standing in hot conditions (p = 0.036). Although models had a similar capacity to classify behaviors within a temperature range, their accuracy decreased when applied outside that range. Although wearable sensors may help classify behavioral shifts indicative of thermal stress, algorithms must be robustly derived across environments.