You may want t ask your question in the cirrhosis of the liver community. This is the Hepatitis C community although there is some overlap between the two groups.
If you are having sleep reversal problems that is definitely a symptom you should discuss with your doctor as it could be a symptom of hepatic encephalopathy in a patient with cirrhosis
http://www.medhelp.org/forums/Cirrhosis-of-the-Liver/show/1390
After some quick searching on reputable sites, Melatonin does not appear to interact negatively with the liver.
On Mayo, I found a paragraph that says: "Early research found that melatonin may improve liver function in people with nonalcoholic steatohepatitis"
They also indicate more research is needed to confirm this. Below is the page from which I quoted:
http://www.mayoclinic.org/drugs-supplements/melatonin/evidence/hrb-20059770
The recurring admonishment is always, when in doubt, ask your physician.