A member of staff went to waken a resident at the Lighthouse hostel in Ballymena and found 35 Diazepam tablets scattered around including on his mouth, around him and on the floor.
The discovery was made on July 4 this year, Ballymena Magistrates Court heard.
The defendant, Vincent Martin Irvine (35), appeared at court via video link from prison and admitted a charge of possessing a Class C drug.
A defence lawyer said the defendant had a drugs problem including a previous issue with heroin and the current lapse happened following the death of his sister.
The lawyer said whenever there is a crisis in the defendant’s life it tended to lead to the defendant taking drugs.
The court heard the defendant left Belfast because he was “intimidated”.
District Judge Nigel Broderick said the defendant had a very extensive record and jailed him for two months.