extreme insomnia

are there any suggestions to help me sleep at night? i literally will be up all day then fall asleep around 7-8am and wake up from 1-5pm and its KILLING ME. i’ll wake up so tired and then want to fall back asleep & then be wide awake all night. idk what to do anymore, over the counter meds dont help, ive been prescribed medication but got addicted to it years ago and overdosed many times so i cant really do that again. My job isnt very consistent and even if i do work all day i still come home and will be wide awake all night. i work out sometimes when my bipolar isnt mainly on the depression side but that only consists of 30-45min of the day and it wakes me up even more. i dont understand

any suggestions please