This is not specified in the rules, therefore is up to the DM
If you are the player, ask your DM. If you are the DM, make a ruling. The main goal is you and your players having fun:
Rules enable you and your players to have fun at the table. The rules serve you, not vice versa.
(DMG page 235)
You see, 5th edition empowers the DM in ways that 3rd, 3.5, and 4th did not. While rule zero has always applied, 5th edition chooses not to explicitly codify many things. If the DM says you gain a temporary regeneration after eating a troll flesh piece, it happens. If the DM says you get a disease, you get a disease. The DM can also ask you for some kind of a check — let's say, Intelligence (Nature) or Wisdom (Survival) — to determine, what monster flesh is actually edible. This might depend on the adventure though.
An example from the Out of the Abyss book
@guildsbounty pointed to the Out of the Abyss supplement, page 20, "Foraging":
many creatures the adventurers might meet and kill can be butchered. but the meat they yield spoils after a single day if uneaten. Eating spoiled meat might require a Constitution saving throw to keep the meal down. a Wisdom saving throw to avoid acquiring a level of madness from the awful experience (see "Madness" latter in this chapter), or both.
Keep in mind that "monster" is just a creature you fight with
Player's handbook uses the word "monster" in two different contexts, see About monster definition and distinctions :
The term "monster" is used throughout this work in two manners. Its first, and most important, meaning is to designate any creature encountered
A "monster" usually means any creature you can fight with. Aside from the "monstrosity" creature type, there are no other special "monsters" in 5e — a horse is considered as a "monster" when PCs fight with it. And yes, people normally eat horses.