The advent of the Internet of Things (IoT) has revolutionised our interaction with the environment, facilitating seamless connections among sensors, actuators, and humans. Efficient task scheduling stands as a cornerstone in maximising resource utilisation and ensuring timely task execution in IoT systems. The implementation of efficient task scheduling methodologies can yield substantial enhancements in productivity and cost-effectiveness for IoT infrastructures. To that end, this paper presents the IoT-mist bat-inspired algorithm (IMBA), designed specifically to optimise resource allocation in IoT environments. IMBA’s efficacy lies in its ability to elevate user service quality through enhancements in task completion rates, load distribution, network utilisation, processing time, and power efficiency. Through comparative analysis, IMBA demonstrates superiority over traditional methods, such as fuzzy logic and round-robin algorithms, across all performance metrics.