The parent stays for a full day and then at midnight of the second day, the light comes on the parent says goodbye to the baby and he/she is gone. In the morning you will only see one "Z" sleeping.
Your adult tamagotchi will leave after taking care of your tamagotchi a full 24 hours. Pausing it will make it stay another day. People pause it if they want the parent to take care of the child in case they are busy.