Kerry Richard Hall set fire to his bed sheets on March 24. The fire engulfed the flat but was brought under control by a neighbour using a garden hose until fire services arrived.
Judge Stephen O’Driscoll said Hall was agitated when fire services arrived and was later arrested by police.
Judge O’Driscoll said Hall’s actions were "deliberate", "irrational" and posed "significant risk" to the 20 other tenants in the housing complex.
Hall claimed he started the fire to remove spirits in his room.
Hall was sentenced on Wednesday after pleading guilty for arson.
Judge O’Driscoll started Hall's sentence at four and a half years but reduced it by 23 months due to Hall pleading guilty and his mental health.
Hall has 120 convictions dating back to 1992, however this is his first for arson.