Medical leave, or medical rest leave, was a term in Starfleet which described shore leave at medical order.
According to Starfleet regulations, an officer taking medical leave could select their rehabilitation facility. (DS9: "It's Only a Paper Moon")
In 2254, Doctor Phil Boyce advised Captain Christopher Pike to take his rest leave, but Pike considered leaving the ship instead. (TOS: "The Cage") Sometime prior to 2257, Pike took medical leave, a fact which was listed, along with the afflictions he experienced during his lifetime, in the medical history section of his personnel file. (DIS: "Brother")
That year, Spock went on medical leave to be treated for psychiatric problems on Starbase 5. (DIS: "Point of Light")
Following her Gorn infection, Captain Marie Batel spent months on medical leave on the USS Enterprise in 2261. While Batel at first appeared to be nearly fully recovered by Federation Day and ready to take a new command, the subsequent recurrence of her infection and Batel's transformation into a Human-Gorn hybrid further extended it. While she was not yet ready to return to command of a starship, Batel sought to return to the Judge Advocate General's Office and was offered a promotion to its head following Vice Admiral Pasalk's retirement. Batel underwent an exhaustive week-long evaluation and was allowed to return to active duty as the future Judge Advocate General. (SNW: "Wedding Bell Blues", "Shuttle to Kenfori", "Through the Lens of Time", "Four-and-a-Half Vulcans", "New Life and New Civilizations")
In 2266, Dr. Leonard McCoy good-naturedly accused Fisher of falling and injuring himself on purpose so he could get a vacation. (TOS: "The Enemy Within")
Later on, in 2267, Captain James T. Kirk visited the Shore Leave Planet after being informed by Spock that his reaction time and associational reading were poor. (TOS: "Shore Leave")
Also that same year, Montgomery Scott took medical leave on Argelius II after sustaining a head injury. (TOS: "Wolf in the Fold")
In 2375, Ensign Nog was ordered to take medical leave by Starfleet Command after he lost a leg in the battle of AR-558. Upon his return to Deep Space 9 Captain Benjamin Sisko read the orders from a PADD and told Nog that his medical leave was granted with the exception of his participation in his welcome home party in the wardroom. (DS9: "It's Only a Paper Moon")