Humans demonstrate a circadian rhythm of melatonin production that closely tracks the daily light/dark cycle, with profound increases in circulating levels during the night-time and nearly nonexistent levels during daylight hours. Although melatonin is known to play a role in preparing the brain and body for sleep, its effects on cognition and brain function are not well understood. We hypothesized that declines in morning melatonin would be associated with increased functional activation within cortical regions involved in alertness, attention, and executive function. We measured the change in salivary melatonin from mid-morning to late-morning in 26 healthy young adults who were also exposed to a 30-min period of blue or amber light followed by functional MRI during a working memory task (N-back). Brain activation was regressed on the change in melatonin scores from the mid-morning to late-morning saliva samples and the role of light exposure was also assessed. Although overall melatonin levels did not change significantly over the morning at the group level, individual declines in salivary melatonin were associated with significant increases in activation within the left dorsomedial and right inferior lateral prefrontal cortex during the 2-back condition (P<0.05, cluster corrected). Medial prefrontal activation also correlated modestly with better vigilance performance during the 0-back (P<0.05), but not the 1-back or 2-back conditions. The light condition did not affect the outcomes. These findings suggest declining melatonin levels in the morning are associated with increased prefrontal cortex functioning and may play a role in the increased frontal activation that occurs following awakening.