Just make sure those magnets are totally enclosed, and sealed up tight, or you'll be leaching corroding metal into your tank. Rare earth magnets corrode really really easy... just in normal atmospheric air - that's why they're normally nickel plated. Now dunk one in saltwater. Yikes!
I've heard of folks here using aquarium cleaner magnets for their DIY powerhead holders, and that seems safer since those are designed to go underwater. I'd just make darned sure whatever magents you end up with are completely absolutely positively watertight.