I believe its just honed natural instincts, like feeling the killing intent or something and a glimmer of his old self grabbed his sword and went to the frontlines like how he was trained for decades to do. Some dementia/alzehemiers patients will go through the motions of their previous life...