Functional near-infrared spectroscopy (fNIRS), acquired simultaneously with electroencephalography (EEG), allows the investigation of hemodynamic brain responses to epileptic activity. Because the presumed epileptogenic focus is patient-specific, an appropriate source/detector (SD) montage has to be reconfigured for each patient. The combination of EEG and fNIRS, however, entails several constraints on montages, and finding an optimal arrangement of optodes on the cap is an important issue. We present a method for computing an optimal SD montage on an EEG/fNIRS cap that focuses on one or several specific brain regions; the montage maximizes the spatial sensitivity. We formulate this optimization problem as a linear integer programming problem. The method was evaluated on two EEG/fNIRS caps. We simulated absorbers at different locations on a head model and generated realistic optical density maps on the scalp. We found that the maps of optimal SD montages had spatial resolution properties comparable to those of regular SD arrangements for the whole head with significantly fewer sensors than regular SD arrangements. In addition, we observed that optimal montages yielded improved spatial density of fNIRS measurements over the targeted regions together with an increase in signal-to-noise ratio.