I've considered doing something like this in the future and it could be done for my house, so I'll tell you why it would work for my house as an example to understand the considerations for whether it might be okay for your own.
My house has overhead wires coming to the service entrance from overhead power lines behind the house running between the row of houses on my street and the next street over. The incoming service wire actually goes over the top of my garage at present. There are clearance requirements for overhead wires when they go over the ground, then more clearance is required when it goes over a driveway and more still if it goes over a street.
There are also clearance requirements over a roof, and these depend on roof pitch. My POCO requires 3' clearance if the roof pitch is greater than 4/12 (which mine is) and a greater amount of clearance is needed if the roof pitch is 4/12 or less steep. (I'm going by memory and could be wrong on the exact numbers).
My city also has a limit on overall height of outbuildings at 16'. I've considered that I'd like to make significant alterations to my house (tear off second floor and rebuild full second floor with Victorian styling) and possibly rebuild the garage roof to coordinate. I might end up using more than the height limit and need to apply for a variance, and that variance applicatiion would probably be more likely to get approval if the overhead wires didn't run over the garage.
Key considerations are clearance, assuming this is overhead service, and distance between attachment points. An additional note in my case is that an incoming overhead service to the garage would reduce the length of the service... I'd even wonder if the garage is close enough to the pole that an underground service from the pole would be possible. My parent's house actuall has this where an underground run goes under the driveway and up to the meter on the house.
Anyway, whether this would work is very specific to your situation and there isn't enough info to definitely say, but consider my example for understanding the kind of questions that need to be evaluated and find out if you can speak with someone about it from your POCO and/or if they have any sort of online manuals or guidelines that might help you in your assessment.