I recently bought an electric bike.
so I did a google search on laws. took about 30 seconds.
I found that Congress passed H.R. 727
which states electric bikes with less than 750 watt motors,
are not to be considered motorized.  It also said the Federal Law
supersedes any State laws.
I'm no lawyer, but I believe they're legal.
https://www.congress.gov/bill/107th-congress/house-bill/727/text