This invention provides a device for implantation directly into the spinal cord for the purpose of treating back pain. Electrodes on a backing that conforms directly to the spinal cord are installed as a source of electrical stimulation and pain relief. The floating electrodes can be flexibly mounted to the substrate such that when the electrode array is implanted into the subject, individual electrodes float or move resiliently relative to the substrate to an extent sufficient to accommodate pulsations of the surface of the spinal cord within the dura.