Physical inactivity can negatively impact mental health by increasing the risk of anxiety and depression, contributing to stress and low mood, and decreasing cognitive function. It may also lead to poor sleep, which further exacerbates mental health issues. Regular physical activity can improve mood and reduce these risks.