I know couple people who volunteer for layoff and were laid off.
But I read on this forum many times that you can not volunteer.
They indicated to their manager if layoff come up - they should choose them first.
However, my take is even if they do not volunteer, maybe they would have been the chosen one.