Light in the near-infrared optical window (NIRW) penetrates deep through mammalian tissues, including the skull and brain tissue. Here we engineered an adenylate cyclase (AC) activated by NIRW light (NIRW-AC) and suitable for mammalian applications. To accomplish this goal, we constructed fusions of several bacteriophytochrome photosensory and bacterial AC modules using guidelines for designing chimeric homodimeric bacteriophytochromes. One engineered NIRW-AC, designated IlaM5, has significantly higher activity at 37 °C, is better expressed in mammalian cells, and can mediate cAMP-dependent photoactivation of gene expression in mammalian cells, in favorable contrast to the NIRW-ACs engineered earlier. The ilaM5 gene expressed from an AAV vector was delivered into the ventral basal thalamus region of the mouse brain, resulting in the light-controlled suppression of the cAMP-dependent wave pattern of the sleeping brain known as spindle oscillations. Reversible spindle oscillation suppression was observed in sleeping mice exposed to light from an external light source. This study confirms the robustness of principles of homodimeric bacteriophytochrome engineering, describes a NIRW-AC suitable for mammalian optogenetic applications, and demonstrates the feasibility of controlling brain activity via NIRW-ACs using transcranial irradiation.