Two "Occupy Sydney" protesters who refused to leave martin place overnight have faced court this morning.

Police told Parramatta Bail Court that Akin Sari, 33, struck a police officer in the head with a metal torch in an attempt to prevent a fellow protester being arrested.

Sari, of Northcote, Victoria, and Lachlan Sard were demonstrating on Westpac Bank property but refused to leave when police officers asked them to move on, court documents said. Sari allegedly attacked the officer from behind.

Police said Sari's "cowardly and unprovoked attack" on the officer caused a laceration to his earlobe and bruising and swelling around his eye.

Sari was charged with use offensive weapon to prevent lawful detention, assault police causing actual bodily harm, resist officer and remain on enclosed lands without lawful excuse.