She had forgotten to take the medallion off.
First Nick had changed back to a man. Then they had watched a movie, which was under two hours, but they had done other things too--so by the time Katie had gotten the collar, Megan had been down in her room for hours already.
Adding a night of sleep to that gives about 12 hours. In other words, in the morning, Nick's 12 hours would run out. Katie's 12 hours, however, would still be going.
Nick's time ran out just before he and Katie woke up. He and Katie were sleeping naked and together, so the medallion touched Nick's flesh. Normally this would change each person into the other, but Katie's time hadn't run out yet--it could only transform Nick. Soon, still asleep together were Katie (in Megan's body) and Nick (also in Megan's body).
Nick yawned. Remembering the previous night, he was glad to be back in his own body finally, and to have made up (or so he thought) with Megan. For a second he thought the funny balance of his body was just a side effect from not being used to his male body, but then he realized things were wrong. He lifted a hand to his face, and felt around his breasts and between his legs. There was no doubt about it--he had transformed into Megan!
"Megan, honey," he said. "Wake up... I think we had an accident with the medallion."