He made no statement on his release, but is expected to speak to media gathered outside his home later on Thursday.
Anwar has not been formally charged, but he remains a suspect in the case which threatens to derail his anticipated return to active politics almost 10 years after he was sacked from the government.
Police officials have said he received fair treatment during his almost 24 hours in custody during which he was allowed two visits by family members.
He was arrested an hour before a police deadline for him to voluntarily answer charges that he sexually assaulted a young male aide, the second time he has faced sodomy accusations in a decade.
Anwar has described the sodomy allegations as a "fabrication" and a "malicious" attack by his political enemies.
Sodomy is illegal in Malaysia and carries a jail sentence of up to 20 years if convicted.
Speaking to Al Jazeera shortly after her husband's release, Anwar's wife Wan Azizah Wan Ismail, said he was "very tired ... very fatigued" after sleeping overnight on the cement floor of a police cell.
She said Anwar had been ordered to report back at the police headquarters after a month "but we think there is no case against him".
Wan Azizah, who is president of the Keadilan party, said they suspected that the authorities were trying to get a fresh DNA sample from him to fabricate evidence.
"They already have a DNA sample from the old case, so we are questioning why they need a fresh one," she said.
"We suspect they are trying to fabricate evidence in order to find him guilty."
|Anwar's supporters gathered outside the police headquarters to protest his arrest [EPA]
Responding to news of Anwar's arrest on Wednesday the US State Department said the case raised "serious questions and concerns" over the rule of law in Malaysia.
"We urge Malaysian authorities to resolve this matter in a manner that builds confidence in the impartial rule of law in Malaysia," Sean McCormack, a department spokesman, said in a statement.
Anwar has said the assault allegation by Mohamad Saiful Bukhari, 23, was a government conspiracy to prevent him from seizing power following an unprecedented gain by the opposition in the general elections in March.
In 1998 Anwar faced similar charges when he was accused of sodomising a male assistant.
The accusation led to his sacking from his posts as finance minister and deputy prime minister and an eventual jail sentence.
His conviction on sodomy charges was later overturned by Malaysia's high court, but he served six years on a related corruption charge.
That case sparked massive street protests by his supporters.
With the Anwar case once again stirring political tensions in Malaysia, police have implemented road blocks and security checks around Kuala Lumpur in an effort to prevent fresh protests.