You can but seriously think about it — why do you want it now and what makes you feel you deserve it more than before? Layoffs are a sensitive time that screams “we are financially not doing as well as we hoped” and not “hey please exploit us for more money because we now got it with the layoffs!” I would say if you wouldn’t notmally ask for a raise now, DEFINITELY don’t do it now. You’ll just get rejected and seem oblivious to what’s happening around you.
To clarify this doesn’t mean when layoffs are happening don’t expect to be able to get a raise. It’s to say think about how you approach it because this isn’t the most ideal time to ask.