Skel to infinity morphological operations on 3D volume
As a start, you could look at the distance transform. The distance transform will assign each voxel the minimal distance to the volume boundary. Afterwards you could do a non-maximum suppression. The results should look similar to a skeleton.

I bet there are more sophisticated algorithms available for 3d skeleton extraction, but this is not my field of research, so I cannot help you with that.