First off, I would actually take her to the ped to rule out a urinary tract/bladder infection.
If there ISN'T an infection going on, here are a few things to consider:
1) Regression is TOTALLY natural, especially if she's done some kind of developmental leap recently. It takes tons and tons of energy/time to rewire the CNS, which is what happens when the body is converting urinary control from the autonomic to the somatic. New stuff (like learning the alphabet, or how to swim, or x,y,z), can interupt that process. Which is actually a GOOD thing. We need to know how to hold it AND do other things ;), but it does take a little time. Accidents tend to happen for the first year to year and a half after being completely potty trained. Night time accidents tend to be far more frequent. Most parents I know, use either pull-ups or waterproof sheets/pads etc., for about 2 years after their child is night time trained. (That also helps when they catch a stomach bug, btw.)
2) Night time control is something that in totally OUT of all of our control. AKA, it's not something that we have conscious control over. Punishing someone for something they have no control over will universally cause anxiety, frustration, and resentment. Instead of punishing her for her accidents, try snuggles & telling her that it will be okay, you know her body is learning. If she's awake enough, have her help you toss the sheets in the wash. But she shouldn't be getting in trouble.
3) You say that you're their guardian. Without knowing the situation... could your niece be feeling safe enough now to have nightmares? It's a bizarre thing, I know, but if she DIDN'T feel safe before, and she's starting to now, her mind may be relaxing enough to let her imagine more. Also, if she was hyper-vigilant before, she may now finally be relaxing into deeper more restful sleep.