At mid-night of the second day* the parent will wake up and turn on the lights, but the baby will remain sleeping in bed. The parent will just stand there for about 3 minutes, then jump up and disappear off the screen. (The lights will turn off again, automatically.) When the baby wakes up in the morning, s/he will be alone.
(* example: if your Tamagotchi character mated and had a baby at 10:30 AM Thursday, then the parent will leave the baby at midnight as Friday becomes Saturday.)
If you want the parent to leave early, after it's been with the baby 24 hours, set the time to 11:59 PM and wait one minute.