Trazodone is a serotonin antagonist and reuptake inhibitor, at lower doses it blocks adrenergic receptors and histaminergic receptor which causes sleep induction and may also cause cognitive fogging in some.
If you experience this exactly the next day, could be a possibly by the sedation induced by Trazodone.
Next Steps
Cognitive functions are many, needs evaluation for what exactly are you experiencing. If the symptoms persist, consult a psychiatrist.