1 day is ambitious for getting there and back from Lima. I would recommend taking a late night bus from Lima the night before (appr. $10 per person one way). From Ica to Huacachina - 6-8 soles total. The hostels on the main strip are very decent and have pools (appr. $8 per person for a room of 4). Make sure to sign up for the dune buggying which will include sandboarding ($25 dollars per person if you are staying with the hostel, $30 if not)...much more fun than walking up and you will go to the biggest dunes. The dune buggying alone is the best part, and one of the funnest activities in all of peru. I highly recommend the trip to Huacachina, enjoy!
Dune buggying trips leave in both the morning and in the afternoon. Buses back to Lima can be caught right up till about 9 pm or even later. The road between Lima and Ica is very good and so are the buses (if you pay an extra few dollars for a good one) so sleeping is not a problem.