According to studies people who take sleeping pills constantly as in everyday or nearly everyday have a 35 percent chance of developing cancer.
So it's not a very high chance of getting cancer but the possibility is there.
I personally do not worry about it as you can still get cancer even without taking sleeping pills.
Most people who do get cancer already have weakened immune systems and also have other family that has gotten cancer so then they develop cancer.
But even then you still may not get cancer just because someone in your family has cancer or had cancer.
If you need to take sleeping pills to help you sleep then do so but try to go to sleep without them in other ways as well.
Make sure to avoid coffee or other drinks that contain caffeine a few hours before bed and try going to sleep at the same time each night so that the body gets used to going to bed at the same time.