Calcium and magnesium will influence sleep patterns. Either you need one or the other or both. I would start with a quality magnesium supplement (e.g. don't take mag oxide), if that does not work try a quality calcium supp. I would bet due to your condition that it is probably a mag issue.
Also I would recommend at some point you look at the gut ecology as being the source of your problem. I would guess due to the adrenal reactions etc. that candida is not the primary problem but rather a secondary issue. I suspect the primary issue is parasitical (parasite) .. look at the Metametrix GI Effects Stool test. Rogue bacteria could possibly be an issue as well.
The clear the liver toxins there are a number of things you can do. If you want a protocol, PM me.