Under federal law, it's legal. You would need OT pay, as your residence is not where you are working. (Since you have to maintain a separate one) However, they can also not pay at all for 8 hours in each full 24 hour period if there is a reasonable expectation of sleep. If you do have to wake up and work, you would get paid. All the paid hours, with OT, have to give you a base rate at or above minimum wage. With that many hours, I don't think you can expect the same base rate as a 50 hour per week job.
That's the legal answer (at least the federal part!) NY may have stricter laws. Whether you want this or not is another question!