Transformed Animagi remain in animal form while asleep.
Animagi who are transformed can sleep and stay in their animal form. Scabbers, who’s really Peter Pettigrew, sleeps while around people, and has always remained a rat while asleep. Scabbers is actually shown sleeping, conclusively proving he stays in his Animagus form when sleeping.
“Ron’s magic wand was lying on top of a fish tank full of frogspawn on the window-sill, next to his fat grey rat, Scabbers, who was snoozing in a patch of sun.”
- Harry Potter and the Chamber of Secrets, Chapter 3 (The Burrow)
In fact, Scabbers was known to sleep quite a lot, so it probably wasn’t hard for him to stay transformed then. If it was particularly difficult, he likely wouldn’t sleep in front of people so often.
“Ron reached inside his jacket and pulled out a fat grey rat, which was asleep.
‘His name’s Scabbers and he’s useless, he hardly ever wakes up.”
- Harry Potter and the Philosopher's Stone, Chapter 6 (The Journey from Platform Nine and Three-Quarters)
It likely doesn’t take conscious effort to remain in Animagus form while already transformed, they seem to just stay in Animagus form until they actively transform (or are forcibly changed) back.