if you took Unisom to deal with insomnia during pregnancy - how much / often / how long did you take it?

I'm at 33 weeks and am trying really hard not to take it (usually half a pill) unless I'm desperate (once a week or so), but I'm struggling so much