The function of tyrosine is to participate in the production of neurotransmitters responsible for good sleep.