I think it is most likely that gallbladder/stones and related causes (of) could potentially contribute to sleep disturbances...
Gallstones are caused by excess calcium deposits. I highly doubt Ambien has anything to do with it, but here is a study that shows just over 1% of people taking Ambien in a study, had gallstones. Bear in mind, though, this could be coincidence. Many people have gallstones, many don't even know it, so it could be that they have gallstones and happen to take Ambien as well.