The influence of magnesium, one of the most important cations in the vertebrate body, on the sleep-wakefulness cycle and ECoG patterns in chronically implanted rats recorded during the light period over a 6-hour period was investigated. Two groups of rats were studied. Group 1 (6 rats): after a control period of 2 weeks, the rats were maintained for 9 weeks on a Mg(2+)-deficient diet. Group 2 (5 rats): after a control period of 2 weeks, the rats were maintained for 7 weeks on a Mg(2+)-deficient diet followed by 4 weeks on a normal diet (recovery period: weeks 8-11). Mg(2+)-deficient diet for 9 weeks induced sleep and ECoG time-dependent alterations. After 6-7 weeks on a Mg(2+)-deficient diet (n = 11) sleep analysis showed a significant increase of wakefulness (+50%) at the expense of slow wave sleep (-24%) but paradoxical sleep was not significantly modified. After 9 weeks of a Mg2+ deficient diet, sleep was disorganized: light sleep and polyspikes occurred indicating an increase in neuronal excitability. When Mg2+ was reintroduced in food and water, sleep organization and ECoG recordings were restored to their original patterns. Our findings which are in line with previous clinical and pharmacological observations provide conclusive arguments for the neuroprotective effect of magnesium ions in neurologic disorders and epileptiform activity. Mg2+ deficiency induces ECoG alterations in the rat which bear some similarities with those seen in neurogenic spasmophilic syndromes in man.