Yang didn't sleep, he was watching whether the guards would visit him or not. If it's not, then it means that it was already night or dawn.
He was grinning while playing the key around his fingers.
{This crazy prick over here will escape the boring cell}
Of course he planned everything! From teasing the guards to annoying them until one of them grabbed him by the collar. His hand moved swiftly into its pocket to get the key secretly and then he quickly hid it behind his back the moment he fell on the floor.
{Don't you dare summon my tactics}
AUTHOR: I thought that you really don't have a brain from the first world up to the second world
{Of course I have this what you called secret techniques! Humph!}
AUTHOR: Well, thank you for having a brain this time
{You really don't have any faith in me!}
AUTHOR: Maybe just uhhh 20%
{Whatever!}