You can think of this as a process of dredging up maladaptive deep learning from the depths of your psyche, expunging it en masse, and then adapting to you new, clearer mental landscape before dredging once again.
The process happens in cycles which are often misdiagnosed as bipolar disorder. The cycles begin slowly - months to years - and accelerate as the mind becomes clear of debris. By the end it happens multiple times per day or hour. Eventually it ceases altogether and you rest in equanimity.
This is the process that caused Einstein's eureka moments and the Buddha's enlightenment. Both of these individuals used mental scaffolds to detach from reality so that the learnings of their lives could be consolidated into a single ruleset.
The neurotransmitters necessary to induce this level of neuroplasticity result in extreme clarity and energy and a reduced need for sleep during the export phase. They then rebound and oscillate during the doubt phase. Things get dark and spiky during the crisis phase, before you breathe a sigh of relief in the equanimity phase and everything consolidates for more clarity.
clarity --> doubt --> crisis --> equanimity
I will use the simile of waterfalls feeding into the ocean.
Crisis: micro-thoughts and angst rain down and form streams, torrents and rapids; rough riding for you in your dingy.
Equanimity: rapids converge into a calm and broad flow, peaceful and serene, easy sailing for a while.
Clarity: then comes the lip and then the waterfall itself. It's a fun one; you get to go over it and have a barrel of laughs.
Doubt: the spray from the pool obscures the clarity of the falls and makes you wonder if they existed in the first place.
... and then the next cycle, with the spray forming more rains and rivulets and torrents and rapids.
Over time the small waterfalls come together into larger cascades, until eventually it all feeds into the ocean and you achieve a lasting calm and liberation from the cycle.