Let's clear up the terminology first:
A trench, as @bon has described in their answer, is formed where tectonic plates move towards each other and one of the plates is subducted under the other. @bon has also provided an illuminating illustration. The German term for an oceanic trench is Tiefseerinne (literally "deep sea groove").
rift-valley or graben
A graben or rift valley is formed where tectonic plates move away from each other and part of the broken crust sinks. The illustration below is from Wikipedia. The German term for a graben is Graben (literally "trench").
Now that we know the terminology, we can look at the Mid-Atlantic Ridge.
The Mid-Atlantic Ridge has been created by seafloor spreading: the plates drift apart and the rift is filled with magma from below. The resulting new crust is warmer than the older material surrounding it and therefore has higher buoyancy: it floats more easily and rests higher on the magma below, forming a ridge in relation to the colder, older, more heavy material around it.
You can see this beautifully in the second illustration that @bon has provided: The crust is not thicker under the rift, rather it floats up.
So the ridge is a ridge, not a trench, but the rift valley along its length is not a trench either, but a graben: it has been formed by tectonic plates moving away from each other and parts of the separating ridge breaking off its edge and sinking into the rift.