Psych up copies the opponent's stat changes. Unknown for what duration it applies. But would it copy the stat changes if the opponent mega-evolved?
Psych Up refers to boosts like Swords Dance, Agility, and Calm Mind. These are in a separate category from the stat gains -- and in a few cases, stat losses -- of Mega Evolution.
If an opposing Pokémon uses, say, Dragon Dance, then Mega Evolves the next turn, it will still have those boosts. Therefore Psych Up will still work.
Source: Knowledge