Back in the day, yes. The maximum weight used to be a lot more restricted, which even made it difficult for taller drivers to get a decent drive.
Nico Rosberg also stopped cycling before the 2016 season, where he finally beat Lewis Hamilton, so he wouldn't gain too many leg muscles an additional weight.
Now it's a bit more relaxed. But F1 drivers still need to be extremely physically fit, due to high G-Forces while still operating a racing car at 320ish km/h.