Insomnia after miscarriage?

As

I cramped badly for about three days. It would keep me awake at night from ok m tossing and turning. It's almost been two weeks since that. I can't figure out if I ruined my sleep schedule from the tossing and turning or if this is common after a miscarriage.