Yes, you are allowed to sleep in the departure sections of the Palma airport terminal buildings. But beware that many travelers say it’s hard to find somewhere comfortable to do this. You could consider taking a sleeping bag if you know that you’ll have to stay overnight in the airport.