Sensorimotor integration is closely linked to changes in motor-cortical excitability, observable in the modulation of the 20 Hz rhythm. After somatosensory stimulation, the rhythm transiently increases as a rebound that reflects motor-cortex inhibition. Stroke-induced alterations in afferent input likely affect motor-cortex excitability and motor recovery. To study the role of somatosensory afferents in motor-cortex excitability after stroke, we employed magnetoencephalographic recordings (MEG) at 1-7 days, one month, and 12 months in 23 patients with stroke in the middle cerebral artery territory and 22 healthy controls. The modulation of the 20 Hz motor-cortical rhythm was evaluated to two different somatosensory stimuli, tactile stimulation, and passive movement of the index fingers. The rebound strengths to both stimuli were diminished in the acute phase compared to the controls and increased significantly during the first month after stroke. However, only the rebound amplitudes to tactile stimuli fully recovered within the follow-up period. The rebound strengths in the affected hemisphere to both stimuli correlated strongly with the clinical scores across the follow-up. The results show that changes in the 20 Hz rebound to both stimuli behave similarly and occur predominantly during the first month. The 20 Hz rebound is a potential marker for predicting motor recovery after stroke.