They hid themselves in the darkness.

Literal

They [topic-は] darkness [in-に] body [object-を] hid.

暗がり means 'darkness, dark place.' 身を隠す means 'to hide oneself' — 身 (one's body) is the object.