Provided are systems, methods, and devices for providing mediation or alleviation of sleep disorders and insomnia. Systems may include an interface, processing devices, and a controller. The interface is configured to obtain measurements from a brain of a user with sleeping disorders and insomnia. A first processing device is configured to generate multiple brain state parameters characterizing one or more features of a brain state of the user. A second processing device is configured to generate models of the brain of the user based on the plurality of brain state parameters and the plurality of measurements, and determine, using the models and training data comprising one or more mediation data points, a mediation procedure for reducing one or more symptoms of the sleeping disorder or insomnia. The mediation procedure is provided to one or more entities, and one or more control signals are generated by the controller based on the mediation procedure.