An implantable microminiature stimulator and/or sensor (microdevice) is housed within a sealed housing that includes all the requisite electronic circuitry for inductively receiving power and control signals to sense of biopotential or other biomedical signals and/or to generate electrical stimulation pulse(s) between opposing electrodes. In a preferred embodiment, the housing of the microdevice is tubular, with opposing electrodes extending from each end. The electrodes are self-attaching electrodes that attach to a nerve or muscle without suturing. The electrodes are configured to helically curl around the desired nerve, thereby permitting the microdevice to stimulate the nerve or muscle, or sense signals associated with the nerve or muscle, using a minimal amount of energy. The electrodes and microdevice are sufficiently small to allow attachment to a single nerve, thereby preventing tethering of the nerve or muscle, and to allow their implantation within living tissue through small incisions or puncture holes. The muscle or nerve to which the microdevice is attached may be of any type, e.g., skeletal, smooth or cardiac.