Ответ:

The girl was smiling as she was putting on her pyjamas, switched off the light and went to bed.