Depending on what you eat, your body releases insulin to help respond to the increase in glucose in your bloodstream. This also affects what amino acids are sent to the brain. If your meal is high in protein, your body sends more of the amino acids leucine, isoleucine, and valine to your brain, which can limit the tryptophan sent to the brain. Eating more carbs allows more tryptophan to enter the brain (via a 1986 article in Appetite).
Tryptophan is one of those essential amino acids you need from your diet so your body can make serotonin. Serotonin is a neurotransmitter that helps regulate your mood, sleep, digestion, learning, and memory. People with low serotonin levels could experience anxiety or depression.
Despite the fact that serotonin communicates messages from your brain to the rest of your body, your gut hosts most of your body’s serotonin (via the Cleveland Clinic). Moreover, even if you’re craving bread, any sugar found in foods will boost your serotonin levels.