The space environment is pretty psychologically stressful for astronauts. They may have difficulty adjusting to microgravity, suffer fatigue and struggle with sleeplessness from disruption of their circadian rhythm. There's also the intense, high-pressure workload, and the aggravations that inevitably result when a bunch of people are confined in a small space for days or weeks at a time.
NASA tries to select astronauts who'll be able to function well mentally in the stressful environment of space, and the agency carefully monitors astronauts' behavior while they're there for signs of trouble. While nobody's had a major psychological crisis on a flight so far, astronauts have suffered from mood and anxiety disturbances, and the data suggests that the longer a mission lasts, the greater the risk to astronauts' mental health. When astronauts start making multiyear trips to Mars or even more distant destinations, this could be a big worry [source: Slack et al.].