The circadian oscillator, an internal time-keeping device found in most organisms, enables timely regulation of daily biological activities by maintaining synchrony with the external environment. The mechanistic basis underlying the adjustment of circadian rhythms to changing external conditions, however, has yet to be clearly elucidated. We explored the mechanism of action of nicotinamide in
Arabidopsis thaliana
, a metabolite that lengthens the period of circadian rhythms, to understand the regulation of circadian period. To identify the key mechanisms involved in the circadian response to nicotinamide, we developed a systematic and practical modeling framework based on the identification and comparison of gene regulatory dynamics. Our mathematical predictions, confirmed by experimentation, identified key transcriptional regulatory mechanisms of circadian period and uncovered the role of blue light in the response of the circadian oscillator to nicotinamide. We suggest that our methodology could be adapted to predict mechanisms of drug action in complex biological systems.