Raw No, Thematically...Maybe
Lets have a look at the Giant Spider From the monster manual:
On the bottom of it's stat block it states:
Web (Recharge 5-6). Ranged Weapon Attack: +5 to hit, reach 30/60 ft., one creature. The target is restrained by webbing As an action, the restrained target can make a DC 12 Strength check, bursting the webbing on a success. The webbing can also be attacked and destroyed (AC 10; hp 5; vulnerability to fire damage; immunity to bludgeoning, poison, and psychic damage)
Thus as the target is restrained they are under the following conditions:
- A restrained creature’s speed becomes 0, and it can’t benefit from any bonus to its speed.
- Attack rolls against the creature have advantage, and the creature’s Attack rolls have disadvantage.
- The creature has disadvantage on Dexterity Saving Throws.
As you can also see there is no 'Cocoon' ability.
Now the point of your question is, does the spider need to make a Grapple, in order to begin cocooning the restrained creature.
When looking at Grappling it states:
When you want to grab a creature or wrestle with it, you can use the Attack action to make a Special melee Attack, a grapple. If you’re able to make multiple attacks with the Attack action, this Attack replaces one of them.
The target of your grapple must be no more than one size larger than you and must be within your reach. Using at least one free hand, you try to seize the target by making a grapple check instead of an Attack roll: a Strength (Athletics) check contested by the target’s Strength (Athletics) or Dexterity (Acrobatics) check (the target chooses the ability to use). If you succeed, you subject the target to the Grappled condition (see Conditions ). The condition specifies the things that end it, and you can release the target whenever you like (no action required).
Therefore in order to grapple the restrained creature the Spider would have too spend an action, (one action to web and another to restrain).
I, in my opinion, would rule that if a creature is 'Webbed' you could still state that they are cocooned but just have the same effects as webbed.