The scholars say this is permissible when there is no long-term harm to the body in doing so. Otherwise, it is forbidden.