Sleep medications to induce sleep are helpful
for short term insomnia.
For long term use they are best avoided,
and besides you may develop tolerance to the medication. So, try weaning away from them and slowly try to adopt good sleep hygiene measures to promote sleep. Also, being overweight can worsen the osteoarthritis, so to begin with try light exercises like walking and then gradually build up under the guidance of a physiotherapist.