How does SDS-PAGE separate based on mass?
You are correct that molecule mobility depends on the mass-to-charge ratio, and this means that different sized molecules with the same $\frac{m}{q}$ will have the same acceleration.  However, the velocity of a molecule moving through a gel matrix depends on the point at which the force exerted by the electric field is in equilibrium with the frictional forces acting on the molecule.  Modeling different sized molecules as spheres of different sizes, we can apply Stokes' Law

$F = 6\pi \mu Rv$

where $\mu$ is viscosity of the matrix (constant), $R$ is the radius of our molecule, and $v$ is the flow velocity.  

Rewriting your equation, we see that

$F = qE = ma = 6\pi \mu Rv$

and 

$v = \frac {ma}{6\pi \mu R}$

For constant $a$ and $\mu$, we see that velocity varies with the ratio of mass to radius

$v \sim \frac{m}{R}$

For our model spheres, assuming uniform density, radius scales cubically with mass, meaning that $\frac{m}{R}$ decreases as molecule size increases.

($d = \frac{m}{V}$ and $V = \frac{4}{3}\pi R^3$ where $d$ is density and $V$ is volume)

So, larger molecules will reach force equilibrium with the opposing frictional resistance at a lower velocity compared to smaller molecules, thus explaining how different sized molecules with the same $\frac{m}{q}$ will separate on a gel.  One caveat to this explanation is that polypeptides and nucleic acids are poorly modeled by spheres, and that the mass of such molecules scales linearly with length.