Anthony Cooney (24) took the phones belonging to two people receiving treatment at Tallaght Hospital after "wandering into" their wards, a court heard.
He maintained he was "out of his mind" on drugs at the time and believed for weeks afterwards that the phones were his own.
Judge Anthony Halpin sentenced him, but backdated this to the beginning of a separate jail term Cooney was already serving.
Cooney, of Cushlawn Dale, Tallaght, pleaded guilty to stealing phones from two men in Lane and Webb Wards at Tallaght Hospital on May 22 last year.
Judge Halpin told Tallaght District Court: "We have to appreciate the seriousness of this particular offence. Sometimes for patients in hospitals, it is the only means of communicating.
"It's nasty to deprive someone who is sick in hospital the opportunity of being able to talk to their mother or loved ones."
Defence solicitor Michael Hennessy said Cooney appreciated this. There were "non-aggravating factors" including the fact that there was no confrontation with the victims.
He said Cooney had wandered into an empty room and then a ward.
"He was out of his head on drugs," Mr Hennessy said. "He is not happy himself about this, he is disgusted with himself."
Cooney could not remember the theft, but maintained that at the time, and for several weeks afterwards, he believed the phones had been his own.
This spoke of his "drug- addled state", Mr Hennessy said. "He was out of his mind on heroin and tablets," he added. "He did not go into the hospital with a view to depriving people of their phones."
Cooney's baby son was ill, having been born weighing 2lb eight weeks ago. The defendant, who was in custody serving a sentence, had himself suffered anxiety having to constantly phone to check on his progress.
Relatives of the accused had died in hospital shortly before the crimes were committed.
In addition, his "effective brother-in-law" was murdered earlier this year.
The accused was now stable on a methadone programme. He had had time to "have a look at himself" while in jail.
"He doesn't like what he sees," Mr Hennessy said. He was serving a sentence with a release date of March 22. Judge Halpin imposed a four-month and a two-month sentence, made them concurrent and backdated them to November 8, 2012.