Autonomous takeoff and landing is a big challenge in the field of airborne wind energy. We propose numerical methods in order to optimize flight trajectories of a tethered aircraft. These flight trajectories yield a baseline for analyzing takeoff or landing performance. In this paper, we optimize for a landing strategy that uses the winch to decelerate the aircraft after touchdown. A complete optimal control formulation with differential algebraic equations for the system dynamics is derived. For avoiding tether collision with the ground, we employ a quasi-static tether model that treats both the tether sag and elasticity. It is a novelty in airborne wind energy trajectory optimization to solve for the tether shape as part of the optimization problem.