Patients with interstitial cystitis/bladder pain syndrome (IC/BPS) suffer from chronic pain that severely affects quality of life. Although the underlying pathophysiology is not well understood, inhibition of bladder sensory afferents temporarily relieves pain. Here, we explored the possibility that optogenetic inhibition of bladder sensory afferents could be used to modulate bladder pain. Specifically, we chose to study the role of Nav1.8+ sensory afferents before and after induction of a mouse model of bladder pain. The light-activated inhibitory proton pump Archaerhodopsin (Arch) was expressed under control of the Nav1.8+ promoter to selectively silence these neurons. Optically silencing Nav1.8+ afferents significantly blunted the evoked visceromotor response to bladder distension and led to small but significant changes in bladder function. To study of the role of these fibers in freely behaving mice, we developed a fully implantable, flexible, wirelessly powered optoelectronic system for the long-term manipulation of bladder afferent expressed opsins. We found that optogenetic inhibition of Nav1.8+ fibers reduced both ongoing pain and evoked cutaneous hypersensitivity in the context of cystitis, but had no effect in uninjured, naive mice. These results suggest that selective optogenetic silencing of bladder afferents may represent a potential future therapeutic strategy for the treatment of bladder pain.