Longitudinal total knee arthroplasty (TKA) studies indicate that a substantial percentage of patients continue to experience clinically significant pain and functional impairment after surgery. Insomnia has been associated with poorer surgical outcomes; however, previous work has largely focused on long-term postsurgical insomnia. This study builds on previous work by examining sleep and pain outcomes about perioperative insomnia trajectories. Insomnia symptoms (using the Insomnia Severity Index) during the acute perioperative period (2 weeks pre-TKA to 6 weeks post-TKA) were used to classify participants into perioperative insomnia trajectories: (1) No Insomnia (ISI < 8), (2) New Insomnia (baseline < 8; postoperative ≥ 8 or ≥6-point increase), (3) Improved Insomnia (baseline ≥ 8, postoperative < 8 or ≥6-point decrease), and (4) Persistent Insomnia (ISI ≥ 8). Insomnia, pain, and physical functioning were assessed in participants with knee osteoarthritis (n = 173; Mage = 65 ± 8.3, 57.8% female) at 5 time points: 2 weeks pre-TKA, post-TKA: 6 weeks, 3 months, 6 months, and 12 months. Significant main effects were seen for insomnia trajectory and time, and trajectory-by-time interactions for postoperative insomnia, pain severity, and physical functioning (P’s < 0.05). The Persistent Insomnia trajectory had the worst postoperative pain at all follow-ups and marked insomnia and physical functioning impairment post-TKA (P’s < 0.05). The New Insomnia trajectory had notable long-term insomnia (6 weeks to 6 months) and acute (6 weeks) postoperative pain and physical functioning (P’s < 0.05). Findings indicated a significant relationship between perioperative insomnia trajectory and postoperative outcomes. Results of this study suggest that targeting presurgical insomnia and preventing the development of acute postoperative insomnia may improve long-term postoperative outcomes, with an emphasis on persistent perioperative insomnia due to poorer associated outcomes.