で indicates state/manner (様態) there.
e.g.
みんなで働く
to work all together
ずぶ濡れで歩く
to walk with soaking wet clothes
小さな声で話す
to talk in a small voice
笑顔で挨拶をする
to greet with smiling
Thus, the sentence means "Can you go to the toilet alone (= in the state of a single person) at night?".