There is conservation of energy, you're not going to gain mass without eating, but if you change nothing else and take a myostatin inhibitor or any other medication that inhibits myostatin (like growth hormones) it is guaranteed you will gain muscle.
There are many people and animals who have dysfunctional myostatin so we already know what happens when myostation is inhibited.
Growth hormones inhibit myostatin so any regular GH or GHRP will help build muscle and retain it and the effect of these have been extensively studied.
These are very new and untested in large populations, but from everything I've heard so far it seems they still won't magically make you gain muscle without lifting heavy things and eating protein. They'll just take the limiter off when you do that so you can gain even more muscle than you would otherwise.