I don’t have a direct or a very reputable reference to answer this question, but I work in the clinical field and have seen many insomniacs, so I’ll offer you the answers based on the references and the experiences I have for you to consider in the meantime.
Melatonin’s principal function is to convey the message of darkness or information about timing of the day and night to the central circadian clock. [1-3]
In mammals, a central circadian clock, located in the suprachiasmatic nuclei (SCN) of the hypothalamus, tunes the innate circadian physiological rhythms to the ambient 24 h light–dark cycle to invigorate and optimize the internal temporal order. … Melatonin conveys the message of darkness to the clock and induces night‐state physiological functions, for example, sleep/wake blood pressure and metabolism. 
The primary physiological function of melatonin, whose secretion adjusts to night length, is to convey information concerning the daily cycle of light and darkness to body structures. 
Melatonin does not have direct effects on sleep-wake cycles, which are governed by other complex neural circuits in the brainstem. It is not one of the neurotransmitters in the complex sleep-wake neural circuits, which utilize cholinergic, noradrenergic, and serotonergic neurotransmitters. Melatonin just influences the circuits by conveying the message of darkness or timing of the day and night to the SCN, the central circadian clock, which in turn, affects the sleep-wake neural circuits.
The highly organized sequence of human sleep states is actively generated by nuclei in the brainstem, most importantly the cholinergic nuclei of the pons–midbrain junction, the noradrenergic cells of the locus coeruleus, and the serotonergic neurons of the raphe nuclei. The activity of the relevant cell groups controls the degree of mental alertness on a continuum from deep sleep to waking attentiveness. These brainstem systems are in turn influenced by a circadian clocks located in the suprachiasmatic nucleus and VLPO of the hypothalamus. The clock adjusts periods of sleep and wakefulness to appropriate durations during the 24-hour cycle of light and darkness that is fundamental to life on Earth. 
Clinically, melatonin seems to be neither necessary nor sufficient for sleep to occur. This is evident by the fact that when melatonin is high in the night and a person is about to fall asleep or even asleep, he /she can be awakened and remain awake by some strong stimulus despite the high level of melatonin at that time. Also, if melatonin is given to awake people, they may feel like sleeping, but, unlike strong sleeping pills (which mostly affect cholinergic, noradrenergic, and/or serotonergic neurotransmissions), they may not fall asleep if other things such as surrounding circumstances do not allow them to sleep. So, melatonin alone is not sufficient for sleep to occur or be maintained.
On the other hand, when a person is deprived of sleep for one or more nights, he/she can fall asleep during daytime even if the level of melatonin is low at that time. Or, if strong sleeping pills (which mostly affect those mentioned neurotransmissions) are given to awake people during daytime, when melatonin level is low, they will fall asleep despite the low level of melatonin. So, melatonin alone is not necessary for sleep to occur or be maintained.
In summary, the principal role of melatonin regarding sleep is to convey the message of darkness or information about timing of the day and night to the central circadian clock to influence the sleep-wake neural circuits so that the animal, including human, can sleep at appropriate time; but it is not necessary or sufficient for sleep to occur or be maintained.
Nava Zisapel. New perspectives on the role of melatonin in human sleep, circadian rhythms and their regulation. Br J Pharmacol. 2018 Aug; 175(16): 3190–3199.
Claustrat B, Leston J. Melatonin: Physiological effects in humans.. Neurochirurgie. 2015 Apr-Jun;61(2-3):77-84. doi: 10.1016/j.neuchi.2015.03.002.
Pandi-Perumal SR1, Srinivasan V, Spence DW, Cardinali DP. Role of the melatonin system in the control of sleep: therapeutic implications. CNS Drugs. 2007;21(12):995-1018.
Purves D. Chapter 27. Sleep and wakefulness. Neural circuits governing sleep. In Neuroscience. 3rd ed. Sunderland, Massachusetts: Sinauer Associates Inc; 2004. p 674-684.