Legality wise, it is illegal as per the law of the land, and you could be subject to prosecution (if caught). 

However, admission of unmarried couples depends on the hotel - not all hotels  have the same policy so better check with the hotel directly.