Chaining up a creature in combat

Can you use chains to chain up a creature in the middle of combat? (What if it becomes stunned or paralyzed for a round? – Would this be enough time?). What would the creatures condition be afterwards? Would it be restrained and still be able to attack?