Hi OP, I've had extremely bad hair matting before when I broke my ankle and my arm and couldn't wash my hair, it's long and got into a huge matted section at the back. I thought I would have to cut it off but I found this way of detangling by watching Youtube clips:
There's a specific method which is different to just normal level knots. You know how people say avoid silicones and go all natural? Well the method for undoing matting is the opposite. You want all the silicones (just temporarily) because they lubricate the hair strands to aid detangling.
The best products for this I found are: Pantene Repair and Protect shampoo (brownish label) followed by Garnier Ultimate Blends Argan Richness conditioner or the Pink L'Oreal conditioner. Then finally Mane and Tail detangler spray. These are all silicone heavy products that detangle well, we're not choosing them for necessarily being the best products out there but for this specific situation.
First of all, after washing and and applying Mane and Tail detangler on wet hair, keep the hair wet and work on it while it's wet because it's easier to detangle wet.
Don't use any comb or brush, not even the Tangle Teaser for now until you have worked through the matted hair and it's in a brushable state. This is because brushes will pull the knots in the matted hair tight so they can't be undone.
Just use your fingers to work from the bottom up of the matted section, never pulling too hard because all pulling does is tighten the knots. If you can section the "matt" into smaller bits then do so and work on each smaller section individually.
If you can't, just work on the matted section as a whole.
If you start getting frustrated take a break, don't get upset and pull hard on a section.
Just keep working from the bottom up slowly, easing the hairs apart with your fingers.
You can do it, you can watch clips on Youtube for inspiration. Just take your time and it can be done.
I wish I could help in person because after my experience I'm an expert! But good luck x