It depends on the company and situation. Sometimes they ask for volunteers and you can request the package, most times you don't get a choice.
The writing is usually on the wall for a while before the layoff actually happens, so there's time for you to let your manager know that you wouldn't mind getting the boot.