Trazodone's effects come from several overlapping actions rather than one single mechanism. It blocks 5-HT2A and 5-HT2C serotonin receptors, weakly inhibits serotonin reuptake at the SERT transporter, blocks histamine H1 receptors, and blocks alpha-1 adrenergic receptors.
The serotonin receptor and reuptake activity is thought to underlie its antidepressant effect. The antihistamine activity is largely responsible for its sedating properties — the same mechanism many over-the-counter sleep aids use. The alpha-1 blockade contributes to its blood-pressure-lowering, dizziness-on-standing side effect.
The liver also converts some trazodone into an active metabolite called mCPP, which has its own serotonergic activity and is part of why certain liver-enzyme-affecting medications matter for trazodone interactions.