If one happens to undress, does he need to do his ablution again?

No. Being undressed when one is alone does not render ablution invalid. In fact, when we take a bath, we have ablution and we are totally undressed. Why should the case be different otherwise?