In order for the Body Temperature to be enabled for Pillow, please follow the below steps:
1. Open the Health app on your device
2. Tap on your profile icon on the top right corner
3. Find the section "Privacy" → Tap on "Apps" → Scroll to find "Pillow"
4. Tap on "Pillow" → Ensure that the "Wrist Temperature" toggle is enabled
Also, please note that your Apple Watch must be set up to fall into sleep mode while you are wearing it in order to track your temperature. You can find more detailed information about the sleep mode on the following link https://support.apple.com/en-us/HT211685
This feature is only available for Apple Watch Series 8 or newer.