I am still not over the fact that Loki actually did a really good job as a king. He probably started to fix up the mess with the whole 'frostgiants are monsters', cause he probably would have never been able to put that play up.
Think about it. Asgard lived with this attitude for centuries, but as Odin, Loki was able to change this. He probably wasn't that lazy like it looks like in the movie, after all, he had four years till Thor showed up. In this time, he decided to make Asgard more open towards other species. Give the other worlds space, but why?
Maybe Loki wanted the other seven realms to learn to act on their own. In case Asgard wouldn't be able to help them, cause Loki knew that Thanos could have shown up any moment to get the Tesseract.
But back to the frostgiants.
So, we see in the movie that Loki shows his true heritage to Asgard without causing any disgust or fear. I think, and I am speaking here out of my own experience, that Loki processed his identity crisis with writing this play. Not that I had also an identity crisis, but writing down your experiences and turning them into a story can be very helpful to handle different situations better and to understand them. He also understood while writing that he needed to change the attitude of Asgard towards frostgiants. As Odin, this wouldn't be a problem and while he was working of making Asgard more open minded, he also maybe started to interact with Jotunheim on a diplomatic way. I don't say that he has, but it could be. After all, he is the rightful king of Jotunheim and to be able to say this, you should be sure about your position.
I can imagine that Loki came to a point during his four years of reign that he has to deal with his frostgiant site. Maybe he even tried to figure out who his mother was and while doing so, he also tried to gain the trust of Jotunheim. And the fact, that he says in IW without hesitation that he isn't Asgardian and that he is the righful king of Jotunheim actually proves that he doesn't care any longer about this problem. He came to terms with himself.












