Maintenance planning for busy railway systems is challenging because there is growing pressure on increasing operation time, which reduces the infrastructure-accessible time for maintenance. This paper proposes an optimization model that is aimed at finding the best maintenance schedule for multiple components in a railway track to minimize the total cost in the planning horizon. One distinct and practical feature of the model is that the track accessible time for maintenance is limited. We formulate all relevant costs in the component’s life cycle, including maintenance cost, fixed track-closure (possession) cost, social-economic cost related to the effects of maintenance time on the train operation, and service-life shortening cost due to the shifting of activities. Generally, it is beneficial to cluster and maintain several components in a single possession because this helps reduce the cost by occupying the track only once. However, the decision must depend on the available possession time. A sensitivity analysis is performed to highlight the effects of available possession time on the number of required possessions as well as the total cost incurred.