Melatonin may be a potential therapeutic target for bipolar disorder (BD) treatment; however, its role in BD pathophysiology remains poorly understood. This study aimed to investigate the therapeutic and mechanistic role of melatonin in BD using transcriptomics. RNA sequencing (RNAseq) data from 216 post-mortem dorsolateral prefrontal cortex samples (156 controls, 60 BD) were used to generate gene regulatory networks (GRNs). These were compared to lists of melatonin-related genes using gene set enrichment analysis (GSEA) to assess differential expression between people with BD and controls. Furthermore, RNAseq data from NT2-N cells treated with lithium, lamotrigine, valproate, or quetiapine were compared to lists of melatonin-related genes using GSEA. Finally, BD-associated gene regulatory patterns were compared to GRNs induced by melatoninergic agents to evaluate the repurposing potential of these pharmacotherapies for BD. Genes involved in inhibiting melatonin signalling were nominally upregulated in the BD post-mortem gene expression dataset. Transcription factors (TFs) activating melatonin signalling tended to be downregulated in BD females, while TFs inhibiting melatonin signalling were significantly downregulated in BD males. Regarding current treatments, quetiapine caused the greatest number of significant alterations in melatonin-related gene expression, followed by valproate, lithium, and then lamotrigine. Valproate was found to significantly upregulate genes involved in melatonin degradation. Finally, the melatonin receptor agonist GR-135531 was identified as a possible repurposing candidate for BD. Overall, this study provides new evidence that dysregulation of melatonin-related genes may play a role in the pathophysiology of BD, and suggests a number of melatoninergic agents as potential therapeutic candidates for BD.