Different classes of antidepressents have different timeframes and take effect differently. SSRIs certainly behave as you say, but others such as Trazadone (a mixed agent that works seretonen and andrenergic receptors) or Buproprian (norepinephrine and dopamine reuptake, nicotinic receptors) have very different profiles.
Trazadone works rather quickly, has minimal suicidal ideation, and has a side effect of making you sleep. Its often prescribed off-label for insomnia, and always has the instruction to only take at night, before bed.
Buproprian takes full effect within 3 or 4 days o, the first dose. It also is nit certain whether it needs a full titration schedule to discontinue, In trials, it was not distingaishable from placebo in causing suicidal ideation.
Based on OPs report of immediate sleep quality improvement, I would certainly not be surprised if short or long term trazadone were part of their prescribed depresshon management strategy. Its often prescribed in tandem with other agents as well, which we also do not know about.
TLDR: theres more than one kind of antidepressant, they have different mechanisms and side effects, and we don't actually know which ones OP is using