In this paper, we present a game-theoretic model of intrusion detection systems (IDSs) for Mobile Ad hoc Networks. In most of the existing intrusion detection systems for MANETs, a detection system sits on every node, which runs all the time, which is a costly overhead for a battery-powered mobile device. We have used game theory to model the interactions between the intrusion detection system and the attacker to determine whether it is essential to always keep the IDS running without compromising on its effectiveness. The results of our analysis show that one need not keep an IDS running all the time. Besides, our analysis helps in determining how frequently one must keep the IDS running under different conditions.