As long as the user is on the ground (i.e. not Flying-type, has an ability that is not Levitate, is not holding Air Balloon, has not used Magnet Rise, and has not been hit by Telekinesis; or otherwise if it's holding an Iron Ball or been hit by Smack Down, Thousand Arrows, or Gravity), a Nature Power that becomes Thunderbolt, Energy Ball, or Psychic will receive its respective terrain boost.
Unlike the others, Misty Terrain does not boost Fairy attacks, only weakens Dragon ones, so a Nature Power that becomes Moonblast has no corresponding boost.