Milk has tryptophan- pure and simple this is the "active ingredient" that puts you to sleep. Tryptophan is an essential amino acid in that the body cannot create on it's own (i.e. without food). Your body has amino acids and essential amino acids.
Amino acids are created within the body, brain, and nervous system where as "essential" ones the body needs and uses but cannot create without at least a precursor (nutrients from foods/drinks) require nourishment.
Drinking milk warm or cold has the same tryptophan so cold or hot/warm your body still gets the same amount. Likely, physically- the warm part is a stimulation in memory I call the "baby powder effect".
When we were babies and cried more than not because our diapers were, (shall we say- soiled?) from the gobs of milk we drank? Our mothers (and fathers) quickly ran to our rescue to calm us, clean us up and once again we felt "comfortable and safe". As a baby we also passed out once safety was established and we felt relaxed again. The warm fluid entering your body also tends to relax you (but the taste of warm milk will often counter that affect!).
Association Is Powerful
It's this association, the same one surrounding "baby powder smell" that we associate with that time of both vulnerability, a time before all the stress and worry- but rather the time of intrigue, growth, and constant frustration that was always alleviated when we cried- with milk!
Because we cried we got more formula/milk, our diapers changed, cleaned, and safety, comfort, compassion- all things related to safety and relaxation- then often- sleep until the cycle repeated.
The baby powder smell calms most of us, takes us into a neural network of thought patterns that preceded our stress, our independence, and overall reminds us of our mother and the security of our childhood. Being held in our childhood and falling asleep to the milk or formula (warm) made it easier to fall asleep.
The associated womb, safety, comfort, and constant "hush little baby don't you cry, mommas going to sing you a la labye..." and other songs that helped us sleep and relax. We absorbed a lot of lessons (wow my hands move, oh but it's hard to keep them still, or move them to where we want)- the smallest things that we all take for granted are as stressful as a hard day of doing a tedious job or just getting through the day- but to a baby, unlike the "getting through the day" for us- there was always mom, dad, little sisters, and overall- security and comfort- and long days work that always invited sleep.