I do not recommend you to say "pillar la cama" (as Bel says) in any Spanish speaking country, because "pillar" in Latin America means "to pee", and...they would surely laugh of you when you say something like that. So, I think the best "translation" (or similar idiom in Spanish) would be: "tirarse un rato". "Tirarse" makes reference to "sleep", because of of the act of jumping on the bed (even though "tirarse" means "throw oneself", in this case means "jump"). Moreover, "un rato" means "for a while". So, "tirarse un rato" = "dormir un rato" = "catch some Z's".
I hope I'd helped you.