In order to get good sleep, someone has to enter REM (rapid eye movement), which is a deep associated with sleep.
Clearing the human brain is among the many best solutions to prevent panic attacks. https://Gamereleasetoday.com/stopping-panic-and-anxiety-attacks-what-works-and-the-reason-why/