The Internet of Medical Things designates the interconnection of communication-enabled medical-grade devices and their integration to wider-scale health networks in order to improve patients' health. However, because of the critical nature of health-related systems, the Internet of Medical Things still faces numerous challenges, more particularly in terms of reliability, safety and security. In this paper, we present a comprehensive literature review of recent contributions focused on improving the Internet of Medical Things through the use of formal methodologies provided by the cyber-physical systems community. We describe the practical application of the democratization of medical devices for both patients and health-care providers. We also identify unexplored research directions and potential trends to solve uncharted research problems.