The cause of your bleeding is both low lying placenta and sex. When the placenta is low lying it is prone to the trauma caused by intercourse and bleeding occurs. Its best to avoid intercourse. Since you have already reached 37 weeks, take adequate bed rest
Hope for the best.