Is it safe to run power up to attic and back down to another outlet?
There's nothing wrong with this

It's A-OK to run a cable up through the top plate to the attic and back down to the next stud bay as long as the cable is run properly (1.5" setback from the edge of the studs, and run stapled to the top plate in the attic).