The integration of wearable devices in humans' daily lives has grown significantly in recent years and still continues to affect different aspects of high-quality life. Thus, ensuring the reliability of the decisions becomes essential in biomedical applications, while representing a major challenge considering battery-powered wearable technologies. Transferring the complex and energy-consuming computations to fogs or clouds can significantly reduce the energy consumption of wearable devices and result in a longer lifetime of these systems with a single battery charge. In this work, we aim to distribute the complex and energy-consuming machine-learning computations between the edge, fog, and cloud, based on the notion of self-awareness that takes into account the complexity and reliability of the algorithm. We also model and analyze the trade-offs in terms of energy consumption, latency, and performance of different Internet of Things (IoT) solutions. We consider the epileptic seizure detection problem as our real-world case study to demonstrate the importance of our proposed self-aware methodology.