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!