D. to provide electrical signals to initiate peristalsis
The nervous system plays a crucial role in digestion by coordinating the muscle contractions of the digestive tract through electrical signals, which initiate peristalsis—the wave-like movements that propel food through the digestive system.