It could be an early bedsore
due to prolonged rest. Adequate nutrition and hydration is advised along with change in position while resting so that the affected area does not have to bear weight. Medications that decrease the pain can be taken like paracetamol/ibuprofen
provided there are no allergies or contraindications. You may consider visiting a doctor especially if the skin is not intact and the situation is worsening further. Answers to a few more questions can be more helpful like how is your overall daily fluid intake and diet, how often do you change position while resting, did you have similar problem in the past.