Hey
Yeah unfortunately this is an addiction, I had this exact same thing, it can get pretty bad if you don't stop.
I think the first thing you need to do is get rid of the pills, or if you need them for like injuries let someone else hold them for you and then get them at specific times of the day that might work.
You should tell someone like a doctor, maybe get a checkup because drugs are really dangerous, especially pain killers and sleeping pills - they're really easy to OD on, I OD'd by accident once, so be careful, yeah?
I've been through something similar and I'm always here so
PM me if you want
Stay strong,
Anna