This is a natural behavior for hamsters with several possible reasons:
- Scent marking: Hamsters have scent glands and rub to claim territory.
- Scratching: They may be relieving an itch or enjoying the feeling.
- Stress relief: Rubbing can occur if they are stressed or anxious.
- Playful behavior: If they seem happy and energetic, it may just be play.
What you can do:
- Provide plenty of enrichment like toys, tunnels, and a wheel.
- Keep their cage clean.
- Give them safe chew toys.
If concerned, consult a veterinarian or qualified rodent expert.