My assumption is that you're already using conditioner & detangling spray. Those work best. (Actually straight glycerine works the *best* but it's difficult to get ahold of unless you're a chemist) Then it's seriously, just patience.
I have naturally curly hair, so it "locks up" (aka mats) in about 24 hours. In middle school I'd spend the summers on the beach... dreadlock my hair intentionally... and then come fall it was 3 days of sitting on a stool while my mother tested the limits of her vocabulary as she combed them all out.
A BIG trick, while combing out mats is to braid them as you comb them out. Keeps the other little hairs from getting lonely and joining the mats.
So:
- Wash (breaks up the oils and dirt which create a bit of a mud that also helps to hold the mats together)
- Condition (with a THICK conditioner, like Tres Seme, L'oreal, any non-cheap and non-kids conditioner)
- Get out before washing the conditioner out and wrap a towel on your shoulders
- Comb and braid, comb and braid.