The man was arrested at a hotel in Pyrmont in relation to an attack on a Sydney synagogue.