As a player I've done it during my current Brandenburg game. The real crazy part was it was the emperor himself who gave me the territory! He declared war on Bohemia for eating Silesia, called me in as his ally, and I'd conquered half of Bohemia, so in the peace deal (that the ever trolling Hapsburg Emperor signed) gave me Oberpflablargle. A few months later he demands unlawful territory, so I quickly flipped it back to Bohemia for 40 ducats (he was broke, so couldn't get more) Sure it wasn't exactly how the emperor meant it, but hey it worked.
As for using the Unlawful Territory as Emperor I used it myself recently too. Against Bohemia again natch. They ate most of Saxony, leaving only Saxony itself. Since they hadn't annexed anyone, ang both Saxony and Thuringa existed, i had to use the Demand Territory to get the CB to attack. Granted I didn't exactly give the territory back to Saxony... I'm trying to form Germany and Leipzig is kinda needed, so sorry Saxony. You can have Wittenburg back.