Are you cooling down on the treadmill? Like going from a run, into a jog, into a walk, into a sloooow walk? Or are you just - BAM - stopping?
I would guess you need to cool down more. I've gotten dizzy if I overdo it or don't allow enough cool down time (at least 2 minutes.)
What could be causing it: your heart is pumping in overtime to keep you going, then if you suddenly cut it way down, the system demands change so much, you get a head rush from the extra blood pressure?
ETA: Could also be this...
Inner ear wonkiness working itself right again