Optimizing the last train schedule is challenged by the elastic nature of passenger flow and the immutability of the schedule once announced to the public. The elastic passenger demand is first mathematically described, and an optimization method is proposed to minimize the adjustment to the last trains while maximizing the accessible passengers within the metro network. Linearization techniques are then employed to transform it into a linear programming form. The proposed method is verified through a real-world case study, which indicate an 8.4% increase in accessible passenger flow on a weekday with adjustments required for only 3 lines and 10 stations' last train times. In a special event scenario, a 9.8% is achieved with adjustments to 2 lines and 8 stations' last train times. The results suggest that for existing metro systems, judiciously adjusting the last train times can effectively enhance the overall level of nighttime operational service.