The invention relates to a process for preparing substantially pure melatonin having improved water solubility comprising subjecting melatonin to a roller compaction process and also relates to the compacted melatonin obtainable with such process. The process of the invention allows obtaining melatonin with improved water solubility, which is advantageous for the preparation of pharmaceutical compositions and for their use in therapy. Therefore, the invention also relates to the use of compacted melatonin for preparing pharmaceutical compositions, to pharmaceutical compositions comprising compacted melatonin as active ingredient, and to pharmaceutical compositions comprising compacted melatonin for use in therapy.