This document discusses, among other things, a system and method for
optimizing a sleep therapy using a closed loop neuromodulator. A first
sleep disorder event can be detected using first activity information,
and a first stimulus can be provided, in response to the first sleep
disorder event, using a set of stimulus parameters. Termination of the
first sleep disorder event can be detected using second activity
information, and at least one therapy parameter can be adjusted to
decrease an energy level of a subsequent stimulus.