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 nociceptive sensory afferents could be used to modulate bladder pain. The light-activated inhibitory proton pump Archaerhodopsin (Arch) was expressed under control of the sensory neuron-specific sodium channel (sns) gene to selectively silence these neurons. Optically silencing nociceptive sensory 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 nociceptive sensory afferents 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 nociceptive sensory afferents reduced both ongoing pain and evoked cutaneous hypersensitivity in the context of cystitis, but had no effect in uninjured, naïve mice. These results suggest that selective optogenetic silencing of nociceptive bladder afferents may represent a potential future therapeutic strategy for the treatment of bladder pain.