This study aimed to investigate and compare the neurophysiological impacts of two widely used anesthetic agents, Fentanyl and Ketamine, on EEG power spectra during different stages of anesthesia in adult patients undergoing minimally invasive surgery. EEG data were collected from patients undergoing anesthesia with either Fentanyl or Ketamine. The data were analyzed for relative power spectrum and fast-to-slow wave power ratios, alongside Spectral Edge Frequency 95% (SEF95), at 3 key stages: pre-anesthesia, during stable anesthesia, and post-anesthesia. EEG Relative Power Spectrum: Initially, both groups exhibited similar EEG spectral profiles, establishing a uniform baseline (P > .05). Upon anesthesia induction, the Fentanyl group showed a substantial increase in delta band power (P < .05), suggesting deeper anesthesia, while the Ketamine group maintained higher alpha and beta band activity (P < .05), indicative of a lighter sedative effect. Fast and Slow Wave Power Ratios: The Fentanyl group exhibited a marked reduction in the fast-to-slow wave power ratio during anesthesia (P < .05), persisting post-anesthesia (P < .05) and indicating a lingering effect on brain activity. Conversely, the Ketamine group demonstrated a more stable ratio (P > .05), conducive to settings requiring rapid cognitive recovery. Spectral Edge Frequency 95% (SEF95): Analysis showed a significant decrease in SEF95 values for the Fentanyl group during anesthesia (P < .05), reflecting a shift towards lower frequency power. The Ketamine group experienced a less pronounced decrease (P > .05), maintaining a higher SEF95 value that suggested a lighter level of sedation. The study highlighted the distinct impacts of Fentanyl and Ketamine on EEG power spectra, with Fentanyl inducing deeper anesthesia as evidenced by shifts towards lower frequency activity and a significant decrease in SEF95 values. In contrast, Ketamine's preservation of higher frequency activity and more stable SEF95 values suggests a lighter, more dissociative anesthetic state. These findings emphasize the importance of EEG monitoring in anesthesia for tailoring anesthetic protocols to individual patient needs and optimizing postoperative outcomes.