Suggest two places to ask if it is legal in your state. The public service comission (or agency that regulates the power companies) and the state tax agency.
Depending on the laws and regulations that could be perfecty legal of a felony crime.
In my state of Nebraska, it would be a crime. Two reasons since our power compaies are quasi goverment agencies with elected board members the resale of power is illegal here, and there is no sales tax on power ( at least not yet).


ed