To add on to my other reply (just for added clarity) in top lane, it's a lot easier to find opportunities in top lane where you can go into hammer form for a while to farm lane. I'd say the two major factors here are that top has a longer lane and that you find a lot more melee matchups.
In top, a wave freeze can last for a while. In mid, not so much. Even if you freeze it, it never will last very long just because of how short the lane is.
It's more excusable, for current lack of a better word, to go into melee form for a top matchup. Mid has a much shorter lane, so wave freezes dont last as long. Because of it being a shorter lane, the difference between melee form and ranged form is a lot more significant as far as ganks are concerned. Also, matchup-wise. Going into every possible matchup and speaking hypothetically about them would both be tedious and over-analytical. I know from experience that Jayce mid does not get a whole lot out of the mana gain passive from his hammer auto attacks, and here I will try to explain why I think this is. I am going to speak very generally about a few scenarios to hopefully show why.
Jayce vs Melee/Tank. You'll see Jayce start by using his ranged advantage to poke the enemy laner out. Look for a lane freeze. Then shift into hammer form to farm wave once you have the enemy laner starting to play back. I can't think of a tank that can casually go on Jayce early game after being poked down to let's say 2/3 hp or less. And since they're melee, they aren't going to walk up to be close enough for jayce to even go on them with hammer form Q. This is a broad generalization that may have exceptions but I believe will most often be accurate. It will continue this way until either the wave gets pushed to tower or until a jungler comes to gank Jayce. This will offer Jayce ample time to farm waves with hammer form and get his mana back.
Jayce vs Ranged Mid Laner
Alright, so let's suppose Jayce is against a ranged mid laner. In general, Jayce is already going to be subject to receiving more poke because of getting outranged. Just as Caitlyn outranges vayne in lane phase, Jayce's auto attacks are out ranged by Lux E, Orianna Q, Velkoz QW, Viktor E, Azir Q, Xerath Q, Ahri Q, and I could go on for ages. For this reason, even if you manage to successfully both work around the wave (have to work around both melee and caster minions now) to gain an EQ (or even just a casual Q) opportunity and then land it to poke the enemy laner, you still won't necessarily be free to go into hammer form and start farming the wave. You are still putting yourself in a position to take free damage from enemy abilities. You can still get hit by a Lux E without being able to return damage. You can still get hit by Ahri Q. Etc.
Jayce vs Melee Mid Laner
Based on all of the melee matchups, I think this is an exception to top lane. You may be able to poke someone out more with your ranged auto attack advantage, but it's still not a good idea to put yourself into melee form against most melee mid laners. Zed, Fizz, Yasuo, Talon, Diana, Sylas, Akali, and so on. Those are not matchups you are going to be allowed to go into melee form casually to farm a wave and walk out scott free.
And mid is a lane where the difference between being in ranged and melee form is more sensitive because of the number of gank angles and how much smaller the lane is.
This was a pretty rough explanation that surely may have a few exceptions, but in general it is true, speaking from experience, that you will find much less opportunities to farm a wave in hammer form as Jayce mid as opposed to Jayce top.