In this paper, the Internet of Medical Things (IoMT) is identified as a promising solution, which integrates with the cloud computing environment to provide remote health monitoring solutions and improve the quality of service (QoS) in the healthcare sector. However, problems with the present architectural models such as those related to energy consumption, service latency, execution cost, and resource usage, remain a major concern for adopting IoMT applications. To address these problems, this work presents a four-tier IoMT-edge-fog-cloud architecture along with an optimization model formulated using Mixed Integer Linear Programming (MILP), with the objective of efficiently processing and placing IoMT applications in the edge-fog-cloud computing environment, while maintaining certain quality standards (e.g., energy consumption, service latency, network utilization). A modeling environment is used to assess and validate the proposed model by considering different traffic loads and processing requirements. In comparison to the other existing models, the performance analysis of the proposed approach shows a maximum saving of 38% in energy consumption and a 73% reduction in service latency. The results also highlight that offloading the IoMT application to the edge and fog nodes compared to the cloud is highly dependent on the tradeoff between the network journey time saved vs. the extra power consumed by edge or fog resources.