"I can't tell you how excited and grateful I am," he said.
Mirkarimi said that since being separated from his son, he has been buying books and toys to give to him upon their reunion, including a small fire truck he pulled out of his pocket to show reporters.
"It's been so unhealthy for us to be apart," he said. "My son and I are very close."
Although the order involving Mirkarimi's son was modified, the order to stay away from Lopez remains in effect.
That order stems from an alleged domestic violence incident on Dec. 31 in which Mirkarimi is accused of grabbing Lopez and bruising her arm.
It will stay in effect until the end of his trial on charges of misdemeanor domestic violence battery, child endangerment and dissuading a witness. The trial is set to begin Feb. 24.
Before the agreement was approved by Albers, the family court had mediators meet with both Mirkarimi and Lopez to discuss what was in the best interest of their son. The couple had to be in separate rooms because of the stay-away order, Lopez's attorney Paula Canny said.
They returned with an agreement that Albers said "makes absolute sense to me."
However, part of the agreement apparently didn't make sense to the couple's attorneys. Mirkarimi's attorneys told reporters they took the weekend hours outlined in the agreement to mean six hours per weekend, while Lopez's attorneys said that meant up to six hours each weekend day.
Regardless, the agreement means that Mirkarimi will have a chance to see his son this afternoon, the attorneys said.
Lopez briefly spoke to reporters outside of court, saying she is "extremely happy" that Theo is going to see his dad and that "it's going to be a surprise for him."
Canny, Lopez's attorney, took issue with the presence of Assistant District Attorney Elizabeth Aguilar-Tarchi, who is prosecuting the case, at today's family court hearing.
Aguilar-Tarchi tried to speak in front of Albers at the end of the hearing but the judge walked out of the courtroom without addressing her.
"Never before in my career have I seen a deputy district attorney attempt to intervene" in a family court case, Canny said.
She said the prosecutor was "not thinking about what's in the best interest of Theo, but what's in the best interest of her case, and that's just wrong."
A district attorney's office spokesperson was not immediately available to say what Aguilar-Tarchi planned to discuss to the judge.
Canny said she is also considering whether to try to modify the order preventing contact between Mirkarimi and Lopez, saying the sheriff "isn't guilty of the things he's charged of."
Barring any further hearings on the stay-away order, Mirkarimi is next scheduled to return to criminal court at the Hall of Justice on Feb. 22 for a pre-trial conference.
If convicted of all charges, he could face up to a year in jail and three years' probation.
Mirkarimi was sworn in as sheriff on Jan. 8 after serving for seven years on the San Francisco Board of Supervisors.