Given sleep's crucial role in health and cognition, numerous sleep-based brain interventions are being developed, aiming to enhance cognitive function, particularly memory consolidation, by improving sleep. Research has shown that Transcranial Alternating Current Stimulation (tACS) during sleep can enhance memory performance, especially when used in a closed-loop (cl-tACS) mode that coordinates with sleep slow oscillations (SOs, 0.5-1.5Hz). However, sleep tACS research is characterized by mixed results across individuals, which are often attributed to individual variability. This study targets a specific type of SOs, widespread on the electrode manifold in a short delay ("global SOs"), due to their close relationship with long-term memory consolidation. We propose a model-based approach to optimize cl-tACS paradigms, targeting global SOs not only by considering their temporal properties but also their spatial profile. We introduce selective targeting of global SOs using a classification-based approach. We first estimate the current elicited by various stimulation paradigms, and optimize parameters to match currents found in natural sleep during a global SO. Then, we employ an ensemble classifier trained on sleep data to identify effective paradigms. Finally, the best stimulation protocol is determined based on classification performance. Our study introduces a model-driven cl-tACS approach that specifically targets global SOs, with the potential to extend to other brain dynamics. This method establishes a connection between brain dynamics and stimulation optimization. Our research presents a novel approach to optimize cl-tACS during sleep, with a focus on targeting global SOs. This approach holds promise for improving cl-tACS not only for global SOs but also for other physiological events, benefiting both research and clinical applications in sleep and cognition.