It suppresses/prevents only if the creature's ability is magical
Some of the abilities of these monsters are considered magical, some are not. To define if something is magical or not, the Sage Advice Compendium gives us a small questionnaire:
- Is it a magic item?
- Is it a spell? Or does it let you create the effects of a spell that’s mentioned in its description?
- Is it a spell attack?
- Is it fueled by the use of spell slots?
- Does its description say it’s magical?
If you answer yes for any of these questions, the ability is considered magical and thus suppressed by an antimagical field.
Now, between the beholder and the medusa, only the beholder's eye rays are magical. Let's take a look at the beholder's eye rays description (emphasis mine):
The beholder shoots three of the following magical eye rays at random (reroll duplicates), choosing one to three targets it can see within 120 feet of it: [...]
In addition, the description of the Antimagic Cone feature says it works against the beholder's own eye rays (see below), suppressing the petrification effect all together for a targeted creature. If the target is making saving throws against being petrified and enters an antimagical area, it stop making saving throws while it stays in that area, and continues to roll saving throws after leaving the field.
The beholder's central eye creates an area of antimagic, as in the antimagic field spell, in a 150-foot cone. At the start of each of its turns, the beholder decides which way the cone faces and whether the cone is active. The area works against the beholder's own eye rays.
The medusa's (including the undercity medusa introduced in Ravnica) petrifying gaze, however, answer every question of the "Is it magical?" questionnaire above with a no, so a creature petrified by it remains petrified under the effect of an antimagic field.
Antimagic field also suppress the petrification of both the basilisk and cockatrice abilities, respectively (emphasis mine):
Basilisk:
the basilisk can force the creature to make a DC 12 Constitution saving throw if the basilisk isn't incapacitated. On a failed save, the creature magically begins to turn to stone and is restrained.
Cockatrice:
[...] and the target must succeed on a DC 11 Constitution saving throw against being magically petrified.