When your tamagotchi goes to sleep it will take the costume off automatically. If you want to take it off earlier, the only way to do that is to set the time for bed time and then change it back again afterwards. Of course you do this at the cost of losing the costume which you will have to buy back!
You go to the Games section, press Shop, then press button A, 4-5 times fast without taking pauses between them. (It doesnt have to be the first 2 seconds you click "Shop".)