I was recently asked whether doing a marathon nine months out from an Ironman is a valuable experience. It's not necessary but it is an excellent idea, especially if you've never done a marathon. Running 26.2 miles in the Ironman is certainly different from running a marathon; however marathon training is a complement--physically and mentally--to Ironman training. The important thing to remember though, is that you must allow your body to recover from the marathon before asking it to start training for the Ironman.
The work you do to build a running base will carry over into your Ironman training. You obviously won't continue at such a high level of weekly miles immediately following the marathon--you'll take some rest time and then slowly build back up--but the miles you put in training for the marathon will build muscle memory that your body will tap into again as you ramp up your Ironman running miles.
The marathon training will also help your body learn how to function with fewer carbohydrate stores and thus improve your fat-burning process. This training of the physiological system will contribute to laying the groundwork for Ironman fitness and preparedness. In addition, a lot of the benefits you reap from marathon training come once you're tired. The body is encouraged, mentally and physically, to grow resilient to fatigue once you run past the point of tiredness.
Anyone that's run a marathon will tell you how much of it is mental, particularly the last six miles. Being mentally prepared for Ironman training days, let alone the race, is something you must cultivate, practice and refine. Long runs, particularly those in which you're asking yourself to run a portion at marathon race pace, train your mind to stay focused on the moment rather than the distance yet to be covered. You develop patience, strength, positive self-talk and strategies to manage discomfort.
The most important thing to remember--should you decide to do the marathon several months out from the Ironman--is to give your body enough time to recover. Even if you feel like you have very little to no muscle soreness left, there are micro-tears in the muscle tissue that need time to heal. In fact, muscle damage from marathon running can last up to two weeks according to research. In addition, it takes up to 72 hours for your immune system to return to normal after a marathon. If you start back too early with long or overly intense workouts, you are more likely to get injured or sick from a lack of healing and restorative time.
Be sure to give yourself at least three non-running days (or more if you are still feeling DOMS: delayed onset of muscle soreness) but do walk to decrease stiffness. This is a good time to receive some gentle massage which will speed up recovery by circulating nutrient-rich blood to the damaged areas and flushing toxic remains from the race. After this rest period you can begin running or biking slowly every other day for about a week (swimming on the day in between is acceptable). Research shows that by providing an aerobic stimulus every two to three days, we maintain our aerobic fitness and prevent loss of our base fitness.
In conclusion, marathon training and racing can be an asset to pre-Ironman training should you give yourself enough time to recover. That means racing the marathon at least three to four months out from the Ironman race and taking a couple weeks to ease back in before you're back to a daily triathlon training schedule.