If the watch is charging, the app should detect it and react to it accordingly. Else it measures nonsenses and it affects the sleep statistics.
This situation can occur, for example, if you are awake during WBTB technique and you need to charge the watch.