Yes, making lifestyle changes such as maintaining a regular sleep schedule, creating a relaxing sleep environment, avoiding caffeine and alcohol before bedtime, exercising regularly, and managing stress and anxiety can help prevent insomnia.