Joe Russo has explained to ComicBook.com that it took place on Nidavellir. Whilst he never names the place he says "I think that it would be connected to Eitri" and "Thanos had the gauntlet at that point in time". We know Eitri forged the Infinity Gauntlet on Nidavellir and he saying Thanos was there at that time which would indicate that Thanos was also there in the post-credits scene.
The Avengers: Age of Ultron post-credits scene saw Thanos claiming the Infinity Gauntlet and saying, "Fine, I'll do it myself," after Ultron had failed to wipe out humanity. However, in Avengers: Infinity War, it was revealed the Mad Titan had forced Eitri to forge the gauntlet for him. With Eitri's Nidavellir home having been under the protection of Asgard, many fans claim it's impossible for him to have given Thanos the gauntlet so long ago. Joe Russo, director of Avengers: Infinity War, has explained to ComicBook.com that the post-credits scene did, in fact, take place on Nidavellir.
"I think that it would be connected to Eitri," Joe Russo said. "I think that clearly he is the one who forged the gauntlet and Thanos had the gauntlet at that point in time. It's been a while since any of the Asgardians have interacted with Eitri and his people."
ComicBook, 'Avengers: Infinity War' Directors Explain That 'Ultron' MCU Plot Hole
Russo never states when it fits into the timeline but it's possible it takes place closer to Avengers: Infinity War than we are led to believe. And even if it doesn't with Loki in control of Asgard and living the luxurious lifestyle he probably never even noticed what happened on Nidavellir, remember the nine realms were left in chaos during this time which Thor had to go and clean up.
Russo does hint that this is the case when he says "It's been a while since any of the Asgardians have interacted with Eitri and his people".
It's worth noting that Christopher Markus and Stephen McFeely, the screenwriters for Avengers: Infinity War, decided to not even try and think how it would fit in the timeline or where.
At the end of Ultron, he said “Fine, I’ll do it myself.”
Stephen McFeely: Not our movie.
Christopher Markus: And we’ve all sat there and went, “What the hell is he talking about? Where was he when he did that?”
/Film, ‘Avengers: Infinity War’ Writers Are as Confused by Some of the Post-Credits Scenes as You