If it's a baby, they sleep for a bit before evolving into toddlers not long afterwards.
Anyway, Tamagotchis do sleep at night, but they usually sleep at around 8:00pm or so unless you started the Tamagotchi late. If this is the case, as soon as your Tamagotchi is no longer a baby, it will go back to sleep again until morning.