Stain is fine, though most people (and guitar companies) will mask up the pocket from the start and so only have about 1mm of stain and finish round the edges. You do need the finish to roll over the edges or as McCreed says, you are likely to catch the edge of the finish (if it's only right up to the edge rather than over it) and chip it.

If you do finish the inside of the pocket, then the more finish you put on, the smaller the pocket dimension becomes. You'll be finishing the neck itself, so the heel will also be getting slightly bigger. If the neck pocket was a tight fit before finishing, then it's easy to overdo it and have the neck then too big to fit in the pocket. It's happened to builders here before.

Whilst it's easy to sand the finish on the heel of the neck flat, it's a lot harder to do a similar thing within the confines on the neck pocket. So you may then leave what was a flat surface as bumpy, possibly alter the neck angle and make poor neck to pocket contact.

On the other hand, if the pocket fit is slightly loose, then finishing inside the pocket can provide a tighter fit. But a very loose fit will be better solved by strips of veneer rather than a big build-up of finish. So, just be aware of the options and do what's best for what you've got.