Internet of Things (IoT) technologies have become an inevitable part of our lives with many innovations and conveniences in many fields such as education, healthcare, social life and security. While healthcare network complexity and connectivity are developing in a superior manner at the same time, cyber-attack surfaces and vulnerabilities are also increasing dramatically. Harming people either physically or digitally are some of the threat to the health and life of patients through data breaches across multiple departments of health systems. In this research, the prairie dog optimization (PDO) algorithm and multilayer perceptron (MLP) is proposed cyber-attack detection model. The proposed approach was performed the several IoMT cybersecurity datasets using Intensive Care Unit (ICU Dataset), Washington University in St. Louis enhanced healthcare monitoring system (WUSTL-EHMS) datasets, Edith Cowan University- Internet of Health Things (ECU-IoHT), and TON-IoT. PDO is used for selecting the optimal features from the attained dataset, MLP parameters is performed by hyperparameter optimization as well as 10-fold cross-validation technique for performance assessment. The proposed method has the potential to counter cyber-attacks in healthcare applications, it attained higher precision at 99.54%, accuracy of 99.45%, recall 99.56% and f1-score 99.46% in ECU-IoHT dataset.