A leave of absence or sabbatical was an extended period of time off from one's career, while a retreat was a type of religious sabbatical.
Leave of absence[]
In Starfleet, a leave of absence had to be granted by a superior officer, who also had authority to recall one into active service.
In 2151, Hoshi Sato had a leave of absence to teach at Amazon University, which she ended prematurely to serve aboard Enterprise NX-01. (ENT: "Broken Bow")
In 2152, Jonathan Archer offered T'Pol a leave of absence after her second encounter with Menos triggered traumatic memories, but she considered it unnecessary. (ENT: "The Seventh")
After the end of the Federation-Klingon War, Lieutenant Spock requested leave after the appearance of red bursts throughout the galaxy. Captain Christopher Pike agreed to the request, noting that Spock had months of leave time accumulated. (DIS: "Brother") In 2267, again Spock requested a leave of absence, this time from the USS Enterprise, in order to visit Vulcan due to his pon farr. (TOS: "Amok Time")
In 2366, Worf asked for a leave of absence from the USS Enterprise-D in order to travel to Qo'noS and hear the charges against his father, who had been accused of aiding and abetting an attack on a Romulan outpost. Captain Jean-Luc Picard refused, saying instead that he would come with him, as it was only right that he by his side as his captain, since his actions would reflect on the ship and the Federation. (TNG: "Sins of The Father") In 2367, Worf was granted a leave of absence from the Enterprise-D by Jean-Luc Picard to participate in events surrounding Gowron's inauguration. After the Klingon Civil War had started, Worf asked Picard for an extended leave of absence, but was refused; Worf then resigned his commission. (TNG: "Redemption")
In late 2366, Lwaxana Troi asked her daughter whether she had ever thought about a leave of absence. (TNG: "Ménage à Troi")
In 2369, Deanna Troi recommended a leave of absence to Reginald Barclay and temporarily relieved him of duty. (TNG: "Realm Of Fear")
In 2370, Jadzia Dax requested a leave of absence from Deep Space 9 to chase The Albino. Benjamin Sisko initially refused this request, but Dax eventually convinced him. (DS9: "Blood Oath") The following year, Dax requested another leave of absence to live on Meridian, this time for sixty years. (DS9: "Meridian")
In 2373, Odo assured Arissa he would protect her even if he'd have to take a leave of absence. (DS9: "A Simple Investigation")
In 2374, following the First Battle of Chin'toka, Sisko took a leave of absence to live on Earth. (DS9: "Tears of the Prophets")
Following her joining with the Dax symbiont in 2375, Ezri Dax took a leave of absence from the USS Destiny to visit Sisko on Earth. (DS9: "Shadows and Symbols")
In 2376, Deanna Troi asked Picard for a temporary leave of absence from the USS Enterprise-E to again help Barclay on Earth. (VOY: "Pathfinder")
The same year, after The Doctor suggested that his character of Father Mulligan be given a bigger role in the Paris 042 holoprogram, Tom Paris suggested sending Mulligan off on "a retreat to a nearby monastery, where he takes a vow of silence and never speaks again." The Doctor rejected the idea, threatening to make Paris say Hail Marys until Saint Patrick's Day. (VOY: "Fair Haven")
In 2377, The Doctor asked for a temporary leave of absence from the USS Voyager to attend a symposium in the Ovion system. The request was denied by Chakotay. (VOY: "Flesh and Blood")
Sabbatical[]
William T. Riker, who during an 2367 undercover mission on Malcor III as Rivas Jakara was taken to a hospital and discovered to have an alien physiology, lied to his doctors by explaining that his irregularities were the result of inherited genetic traits, which could have been explained by his doctor if she wasn't on a sabbatical. (TNG: "First Contact")
At some point before 2367, the parents of Willie and Jake Potts went on sabbatical, but arranged for their sons to remain on the USS Enterprise-D, contingent on the boys' promise to keep out of trouble. (TNG: "Brothers")
The same year, after Jean-Luc Picard was turned into a child as the result of a transporter problem, Deanna Troi argued that some people would find it hard to accept a twelve-year old captain. After going over several alternatives to commanding a starship, Troi suggested that he take a sabbatical and focus on archaeology for a few years. (TNG: "Rascals")
In 2374, Tora Ziyal took a sabbatical from a Bajoran university to visit her father on Deep Space 9. (DS9: "Sons and Daughters")